llStringTrim
Revision as of 21:30, 26 May 2007 by BamBam Sachertorte (talk | contribs) (llStringTrim trims all white-space, not just spaces)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llStringTrim( string src, integer type );330 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is src with leading and/or trailing white space (spaces, tabs, and line feeds) trimmed from it.
• string | src | |||
• integer | type | – | STRING_TRIM* flag(s) |
Constant | Description | |
---|---|---|
STRING_TRIM_HEAD | 0x01 | Trims spaces off the beginning. |
STRING_TRIM_TAIL | 0x02 | Trims spaces off the end |
STRING_TRIM | 0x03 | Trims spaces off the beginning and end. |
Caveats
Examples
Notes
This function is available in 1.13.4 onwards...
The following examples will make the same result.
string src = " Dah "; st = llStringTrim(src, STRING_TRIM_HEAD); st = llStringTrim(st , STRING_TRIM_TAIL);
string src = " Dah "; st = llStringTrim(src, STRING_TRIM);
This is because (STRING_TRIM_HEAD | STRING_TRIM_TAIL) == STRING_TRIM
.