Difference between revisions of "LlList2CSV"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
(This function transforms the data, there is no expectation of modification, so the caveat isn't needed, though it is on other string and list function articles. I've been meaning to make a template.) |
(Expanded on relationship to llCSV2List) |
||
Line 4: | Line 4: | ||
|func_footnote=More precisely the values are separated with a comma and a space (", ").<br/><br/> | |func_footnote=More precisely the values are separated with a comma and a space (", ").<br/><br/> | ||
This function's functionality is equivalent to <code style="white-space: nowrap;">[[llDumpList2String]]('''src''', ", ");</code><br/><br/> | This function's functionality is equivalent to <code style="white-space: nowrap;">[[llDumpList2String]]('''src''', ", ");</code><br/><br/> | ||
The result of this function is more or less the {{Wikipedia|CSV|CSV}} format, but it does not conform in all its details.<br/><br/> | |||
To reverse the process use [[llCSV2List]]. | To reverse the process use [[llCSV2List]]. But see the Caveat. | ||
|func_desc | |func_desc | ||
|return_text=of comma separated values taken in order from '''src'''. | |return_text=of comma separated values taken in order from '''src'''. | ||
|spec | |spec | ||
|caveats | |caveats=*[[llCSV2List]] will not reverse the process if there are commas in any of the original strings. One way around this is to first use [[llEscapeURL]] on any user-supplied strings before adding them to the list. [[llUnescapeURL]] will reverse [[llEscapeURL]]. | ||
|constants | |constants | ||
|examples=<lsl>default | |examples=<lsl>default |
Revision as of 12:34, 30 October 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llList2CSV( list src );195 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string of comma separated values taken in order from src.
• list | src |
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.
Caveats
- llCSV2List will not reverse the process if there are commas in any of the original strings. One way around this is to first use llEscapeURL on any user-supplied strings before adding them to the list. llUnescapeURL will reverse llEscapeURL.
Examples
<lsl>default {
state_entry() { list my_list = [1, 2.0, "a string", llGetPos(), llGetRot(), llGetOwner()]; llOwnerSay(llList2CSV(my_list)); }}</lsl>
See Also
Functions
• | llCSV2List | |||
• | llDumpList2String | |||
• | llParseString2List | |||
• | llParseStringKeepNulls |
Articles
• | Typecast |