Difference between revisions of "LlCSV2List"

From Second Life Wiki
Jump to navigation Jump to search
Line 8: Line 8:
|caveats=*It eats leading and trailing spaces from values.
|caveats=*It eats leading and trailing spaces from values.
|constants
|constants
|examples
|examples=<pre>
default
{
    state_entry()
    {
        string csv = "first,second,third";
        list my_list = llCSV2List(csv);
        llOwnerSay("CSV: " + csv);
        integer i;
        for (i=0; i<llGetListLength(my_list); ++i)
        {
            llOwnerSay("my_list[" + (string)i + "]: " + llList2String(my_list,i));
        }
    }
}</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llList2CSV]]|}}
|also_functions={{LSL DefineRow||[[llList2CSV]]|}}

Revision as of 14:08, 6 March 2007

Summary

Function: list llCSV2List( string src );

Returns a list made from src as comma separated values.

• string src

Specification

Anything between "<" and ">" is considered a single value regardless of the existence of a comma between.

Caveats

  • It eats leading and trailing spaces from values.
All Issues ~ Search JIRA for related Bugs

Examples

default
{
    state_entry()
    {
        string csv = "first,second,third";
        list my_list = llCSV2List(csv);
        llOwnerSay("CSV: " + csv);
        integer i;
        for (i=0; i<llGetListLength(my_list); ++i)
        {
            llOwnerSay("my_list[" + (string)i + "]: " + llList2String(my_list,i));
        }
    }
}

See Also

Functions

•  llList2CSV
•  llDumpList2String
•  llParseString2List
•  llParseStringKeepNulls

Articles

•  Typecast

Deep Notes

Search JIRA for related Issues

Signature

function list llCSV2List( string src );