string.trimWhiteSpace

Syntax string.trimWhiteSpace (s)

Params s is a string from which you want to trim leading and trailing white space.

Action Removes leading and trailing white space from the string.

White space is defined as spaces, tabs, carriage returns, and line feeds.

Returns The resulting string.

Examples string.trimWhiteSpace (" foo ")

   » "foo"

string.trimWhiteSpace ("")

   » ""

string.trimWhiteSpace ("foo\r\r\t\n \r\r\t")

   » "foo"

string.trimWhiteSpace ("\tfoo")

   » "foo"

Notes This verb was implemented as a script in Frontier 5.1.3. It was moved into the kernel in Frontier 6.1.

See Also string.dropNonAlphas

Discuss