mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Updated lume.split() in README.md
This commit is contained in:
parent
5882ca1303
commit
ad34f6ce33
@ -227,11 +227,12 @@ lume.deserialize("{1, 2, 3}") -- Returns {1, 2, 3}
|
|||||||
```
|
```
|
||||||
|
|
||||||
### lume.split(str [, sep])
|
### lume.split(str [, sep])
|
||||||
Splits the string `str` into words and returns a table of the sub strings. If
|
Returns an array of the words in the string `str`. If `sep` is provided then
|
||||||
`sep` is provided the string will be split at any of the characters in `sep`
|
consecutive delimiters are not grouped together and are deemed to delimit empty
|
||||||
instead of on whitespace.
|
strings.
|
||||||
```lua
|
```lua
|
||||||
lume.split("One two three") -- Returns {"One", "two", "three"}
|
lume.split("One two three") -- Returns {"One", "two", "three"}
|
||||||
|
lume.split("a,b,,c", ",") -- Returns {"a", "b", "", "c"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### lume.trim(str [, chars])
|
### lume.trim(str [, chars])
|
||||||
|
Loading…
Reference in New Issue
Block a user