LSL Wiki Mirror 10-5-2006: llList2String

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
string llList2String(list src, integer index)

Returns the string at index from the list src.

Example:
llList2String(foo, 0); // returns the first element in the list
llList2String(foo, 1); // returns the second element in the list

Unlike the other llList2Xxx() functions, llList2String() has some useful default behaviors:
1. If the index refers to a non-existant element, then the empty string is returned. This works if either the index >= the length, or if index < 0 - length.
2. If the item in the list at the index isn't a string, it is cast to a string.

Note that because llList2Vector and llList2Rot will not cast a string to a vector or rotation, you'll need to use llList2String and then typecast the result directly.

Compare with llList2Float, llList2Integer, llList2Key, llList2List, llList2ListStrided, llList2Rot, llList2Vector and llGetListEntryType.


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