---
id: text-split
name: Text.split
category: text
kind: namespace-method
tokens: Text.split
sig: Text.split(s, sep) -> []string
tip: Split a string on a separator into a list.
order: 17
ns: Text
member: split
---
Splits s at every occurrence of the non-empty separator sep and returns the pieces as a []string — the inverse of Text.join. Adjacent separators yield empty pieces, and a string with no separator returns a one-element list holding the whole string. Use it to parse CSV rows, command arguments, or delimited save data.
```ludic
program Demo {
handler Step phase Update {
let fields = Text.split(line, ",")
}
}
```