Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Try this code in the translator:

local Life = " This is life   ";
Life = Life:trimWS()

You’ll see something like this:

The function trims white space from either side of the string. It’s important to know that stripped string is returned - Lua strings are ‘immutable’. Once created they cannot be altered - you can point a variable at a new string.

  • No labels