Don't click here unless you want to be banned.

LSL Wiki : llStringTrim

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
string llStringTrim(string text, integer trim_type)

Outputs a string eliminating whitespace from the start and/or end of the specified string.

Constants for trim_type:
STRING_TRIM_HEAD: trim all leading spaces in text
STRING_TRIM_TAIL: trim all trailing spaces in text
STRING_TRIM: trim all leading and trailing spaces in text

In this case, whitespace can mean:


To eliminate all whitespace:
Example:
llStringTrim(" Testing 1 2 3 ", STRING_TRIM);
Output:
"Testing 1 2 3"

To eliminate only the starting whitespace:
Example:
llStringTrim(" \tTesting 1 2 3 ", STRING_TRIM_HEAD);
Output:
"Testing 1 2 3 "

To eliminate only the ending whitespace:
Example:
llStringTrim(" Testing 1 2 3 \n", STRING_TRIM_TAIL);
Output:
" Testing 1 2 3"


Functions | String
There is no comment on this page. [Display comments/form]