Skip to end of banner
Go to start of banner

trim

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 2 Next »

Description

Returns a trimmed copy of the string passed as parameter with the leading and trailing whitespaces removed.

Parameters

Return Type

String

Example

string original = "   foobar   ";
string trimmed = trim(original);
print(">>" + original + "<<"); // will print ">>   foobar   <<"
print(">>" + trimmed + "<<");  // will print ">>foobar<<"

This also works if the string passed in as parameter only has leading or trailing whitespaces. If the string has no leading or trailing whitespaces, a copy of the original string will be returned.

See also

Filter by label

There are no items with the selected labels at this time.

  • No labels