list llParseString2List(string src, list separators, list spacers)
Breaks
src into a
list, splitting at and discarding
separators, and splitting at and keeping
spacers (
separators and
spacers must be lists of
strings, maximum of 8 each). All instances of each separator will be used to parse the string.
Calling:
Will produce the list:
["one", "two", "three", "'four'", "'five", "six' "]
Calling:
Will produce the list:
["one", "two", "three", "four", "five", "six", " "]
Calling:
Will get the list:
["ll", "ows", "at", "rass"]
Calling:
Will get the list:
["A", "ll", "C", "ows", "E", "at", "G", "rass"]
So, when
["A", "C", "E", "G"] was in
separators, it removed them, then split the string at that point. When
["A", "C", "E", "G"] was in
spacers, it splits the string before and after each spacer, leaving the spacer intact.
To split a sentence into words by using " " as the separator:
Returns this list:
["All", "Cows", "Eat", "Grass"]
Useful function to retrieve a first name from an avatar's entire name (excluding group).
llParseStringKeepNulls: returns
null strings between seperators or spacers
llDumpList2String: performs the opposite function.
See also
llCSV2List and
ExampleListConversion.
Functions |
Lists |
Strings