Improved lume.split()'s README.md section for clarity

This commit is contained in:
rxi 2014-03-19 19:26:55 +00:00
parent ad34f6ce33
commit d69f419f5a

View File

@ -227,9 +227,9 @@ lume.deserialize("{1, 2, 3}") -- Returns {1, 2, 3}
```
### lume.split(str [, sep])
Returns an array of the words in the string `str`. If `sep` is provided then
consecutive delimiters are not grouped together and are deemed to delimit empty
strings.
Returns an array of the words in the string `str`. If `sep` is provided it is
used as the delimiter, consecutive delimiters are not grouped together and will
delimit empty strings.
```lua
lume.split("One two three") -- Returns {"One", "two", "three"}
lume.split("a,b,,c", ",") -- Returns {"a", "b", "", "c"}