LlDumpList2String
Looking for the current API? Open the llDumpList2String reference →
Function notes
Use llParseString2List or llParseStringKeepNulls to undo the process.
Unlike llList2CSV, which dumps a list to a comma-separated formatted string with no choice over the
separator, llDumpList2String gives you more control. This can be useful if you don't trust commas as a separator because you might be working with data supplied to the script by a user who uses, say, commas as part of a street address.Return value notes
Examples
list mylist = ["a", "b", "c", "d"];
string tmp = llDumpList2String(mylist, "**");
//tmp now equals: "a**b**c**d"list mylist = [<10,5,7>, 100, "c", "d"];
string tmp = llDumpList2String(mylist, "**");
//tmp now equals: "<10,5,7>**100**c**d"default{
state_entry(){
list my_list = [1, 2.0, "a string", llGetOwner()];
llOwnerSay("<" + llDumpList2String(my_list,"><") + ">");
//says: "<1><2.000000><a string><a822ff2b-ff02-461d-b45d-dcd10a2de0c2>"
}
}Notes
Instead of using
llDumpList2String(myList, "") you may wish to consider using the more efficient (string)myList as it produces an identical result with less memory usage due to eliminating a function-call. Each element of the list is converted to string format in the result, so floats expand to six digits of precision, rotations and vectors are represented with "<" and ">" characters, etc.See also: functions
See also: articles
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.