Difference between revisions of "LlList2CSV"

From Second Life Wiki
Jump to: navigation, search
Line 2: Line 2:
 
|func_id=195|func_sleep=0.0|func_energy=10.0
 
|func_id=195|func_sleep=0.0|func_energy=10.0
 
|func=llList2CSV|return_type=string|p1_type=list|p1_name=src
 
|func=llList2CSV|return_type=string|p1_type=list|p1_name=src
|func_footnote=Is functionally equivalent to <code>[[llDumpList2String]]('''src''', ", ");</code><br/>
+
|func_footnote=This is functionally equivalent to [[llDumpList2String]]('''src''', ", ");<br/>
 
Do not confuse this function with the {{Wikipedia|CSV|CSV}} format, it is ''not'' the CSV format.
 
Do not confuse this function with the {{Wikipedia|CSV|CSV}} format, it is ''not'' the CSV format.
 
|func_desc
 
|func_desc
|return_text=that is comma separated values from '''src'''.
+
|return_text=that is comma separated values from '''src''' list. The source list may have separators other than commas before you start; the result will still be the same, a string with commas.
 
|spec
 
|spec
 
|caveats
 
|caveats
 
|constants
 
|constants
|examples=<pre>default
+
|examples=
{
+
 
     state_entry()
+
The comma separator is actually comma space.
    {
+
 
 +
list tmp01 = ["a",b,c,d,e]>;<br />
 +
string tmp02 = llList2CSV(tmp01);<br />
 +
//tmp02 will equal: "a, b, c, d, e"<br />
 +
 
 +
 
 +
<pre>default{
 +
     state_entry(){
 
         list my_list = [1, 2.0, "a string", llGetPos(), llGetRot(), llGetOwner()];
 
         list my_list = [1, 2.0, "a string", llGetPos(), llGetRot(), llGetOwner()];
 
         llOwnerSay(llList2CSV(my_list));         
 
         llOwnerSay(llList2CSV(my_list));         

Revision as of 20:15, 7 July 2008

Summary

Function: string llList2CSV( list src );

Returns a string that is comma separated values from src list. The source list may have separators other than commas before you start; the result will still be the same, a string with commas.

• list src

This is functionally equivalent to llDumpList2String(src, ", ");
Do not confuse this function with the CSV format, it is not the CSV format.

Examples

The comma separator is actually comma space.

list tmp01 = ["a",b,c,d,e]>;
string tmp02 = llList2CSV(tmp01);
//tmp02 will equal: "a, b, c, d, e"


default{
    state_entry(){
        list my_list = [1, 2.0, "a string", llGetPos(), llGetRot(), llGetOwner()];
        llOwnerSay(llList2CSV(my_list));        
    }
}

See Also

Functions

•  llCSV2List
•  llDumpList2String
•  llParseString2List
•  llParseStringKeepNulls

Articles

•  Typecast

Deep Notes

Search JIRA for related Issues

Signature

function string llList2CSV( list src );