llList2CSV
function
Function syntax
string llList2CSV(list src// Source list to convert.
);- Returns
string- Energy
- 10
More precisely the values are separated with a comma and a space (”, ”).
This function’s functionality is equivalent to <code style=“white-space: nowrap;“>llDumpList2String(src, ”, ”);
The result of this function is more or less the CSV format, but it does not conform in all its details.
To reverse the process use llCSV2List. But see the Caveat.
Returns a string of comma separated values taken in order from src.
string result = llList2CSV([]);Caveats
Section titled “Caveats”llCSV2Listwill not reverse the process if there are commas or oddly matched angle brackets (< and >) in any of the original strings. For details see the articlellCSV2List.- One way around this is to first use
llEscapeURLon any user-supplied strings before adding them to the list.llUnescapeURLwill reversellEscapeURL. - If your strings may contain commas but not unmatched angle brackets you can wrap your strings with angle brackets (< and >) like you would use double quotes around the string and then use
llGetSubStringwith START at 1 and END at -2 to remove them.
Examples
Section titled “Examples”Example 1
default{ state_entry() { list my_list = [FALSE, PI, "a string", ZERO_VECTOR, ZERO_ROTATION, NULL_KEY]; llOwnerSay(llList2CSV(my_list)); }}See also
Section titled “See also”Functions
Section titled “Functions”Articles
Section titled “Articles”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.