Skip to content
lsl.devlsl.devLSL Dev

Category:LSL CSV

This is a historical wiki category. Explore the current topic guides →

LSL Header: {{LSL Header|ml=*}}
The most important thing to know about LSL CSV, it's not traditional CSV. It is not RFC 4180.

Caveats

There are four caveats with LSL CSV.
  • Spaces are trimmed from the beginning and the end of entries.
  • Anything following a "<" is considered part of the same item as long as the number of ">" and "<" are unbalanced.
    • All "<" and ">" are included in the output string.
    • Having a ">" before a "<" has no effect on the output, having too many ">" is not an issue.
  • All Commas not encapsulated in "<" ">" will be treated as deliminators.
  • Any datatype containing a float value when converted to a CSV may loose precision.
llCSV2List("<>,>,a")   == ["<>", ">", "a"]; //didn't match the last ">"
llCSV2List("<<>,>,a")  == ["<<>,>", "a"];   //matched everything
llCSV2List("<<<>,>,a") == ["<<<>,>,a"];     //didn't match the last "<"

Examples

One Way To Embed CSV Lists in CSV Lists
string a = llList2CSV([
        "<"+llList2CSV(["a", "b", "c"])+">",
        "<"+llList2CSV(["d", "e", "f"])+">",
        "<"+llList2CSV(["g", "h", "i"])+">"
    ]);
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 Category:LSL CSV, 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.