strip(
strip(
TEXT
)

The strip( function strips off leading and trailing blanks and other whitespace (carriage returns, tabs, etc.)

Parameters

This function has one parameter:

text – the item of text that you want to strip.

Description

This function removes blanks, carriage returns, tabs, or any other whitespace at the beginning or end of the text, but does not affect blanks in the middle of the text. Here are three examples of how the strip( function works.

    strip(" John Smith") ☞ John Smith
    strip("net 30 ") ☞ net 30
    strip("   New York  ") ☞ New York
    strip("    joy to the world    ") ☞ joy to the world

In the first example, the leading space (in front of John) is removed.

In the second example, the extra space (after 30) is removed.

In the third and fourth examples, both the leading and trailing spaces are removed.

See Also

- percentescape( -- encodes specified characters using percent encoding.
- percentunescape( -- decodes text that contains percent encoding.
- stripchar( -- extracts characters you don't want from a text item.
- stripdiacriticals( -- strips diacritical marks from text.
- stripprintable( -- strips non-printable characters from text.
- striptoalpha( -- removes everything but alphabetic letters from a text item.
- striptonum( -- removes everything but numeric digits from a text item.
- urldecode( -- decodes text that contains percent encoded characters.
- urlencode( -- converts text into a legal URL (by converting spaces into `%20`). WARNING: THIS FUNCTION IS OBSOLETE.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0