Category:LSL CSV - Second Life Wiki

Category:LSL CSV

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/fr Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ja Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

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.

  1. Spaces are trimmed from the beginning and the end of entries.
  2. 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.
  3. All Commas not encapsulated in "<" ">" will be treated as deliminators.
  4. 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"])+">"
    ]);

Pages in category "LSL CSV"

The following 2 pages are in this category, out of 2 total.

C

L