Skip to content
lsl.devlsl.devLSL Dev

LlList2CSV

Looking for the current API? Open the llList2CSV reference →

Function notes

More precisely the values are separated with a comma and a space (", ").

This function's functionality is equivalent to 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.

Return value notes

Returns a string of comma separated values taken in order from src.

Caveats

  • llCSV2List will not reverse the process if there are commas or oddly matched angle brackets (< and >) in any of the original strings. For details see the article llCSV2List.
    • One way around this is to first use llEscapeURL on any user-supplied strings before adding them to the list. llUnescapeURL will reverse llEscapeURL.
    • 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 llGetSubString with START at 1 and END at -2 to remove them.

Examples

default
{
    state_entry()
    {
        list my_list = [FALSE, PI, "a string", ZERO_VECTOR, ZERO_ROTATION, NULL_KEY];
        llOwnerSay(llList2CSV(my_list));        
    }
}

See also: functions

See also: 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.

From the Second Life Wiki

Community documentation adapted from LlList2CSV, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.