# llDumpList2String

*LSL function*

```lsl
string string llDumpList2String(list src, string separator);
```

- `list src`: Source list to convert.
- `string separator`: Separator string to place between list entries.

- Returns: `string`
- Energy: 10

Use [llParseString2List](/functions/llParseString2List/) or [llParseStringKeepNulls](/functions/llParseStringKeepNulls/) to undo the process.

Unlike [llList2CSV](/functions/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.

Returns a [string](https://wiki.secondlife.com/wiki/string) that is the list **src** converted to a string with **separator** between the entries.

```lsl title="How to use" frame="terminal"
string result = llDumpList2String([], "");
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl
list mylist = ["a", "b", "c", "d"];
string tmp = llDumpList2String(mylist, "**");
//tmp now equals: "a**b**c**d"
```

</details>

<details>
<summary>Example 2</summary>

```lsl
list mylist = [<10,5,7>, 100, "c", "d"];
string tmp = llDumpList2String(mylist, "**");
//tmp now equals: "<10,5,7>**100**c**d"
```

</details>

<details>
<summary>Example 3</summary>

```lsl
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>"
    }
}
```

</details>

## 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 "&lt;" and ">" characters, etc.

## See also

### Functions

- [llParseString2List](/functions/llParseString2List/)
- [llParseStringKeepNulls](/functions/llParseStringKeepNulls/)
- [llCSV2List](/functions/llCSV2List/)
- [llList2CSV](/functions/llList2CSV/)

### Articles

- [Typecast](https://wiki.secondlife.com/wiki/Typecast)

---

*Source: [LlDumpList2String](https://wiki.secondlife.com/wiki/LlDumpList2String) on the Second Life Wiki. Content from the Second Life Wiki article LlDumpList2String (revision 1205945, 2017-07-05), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llDumpList2String/
