mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-08-19 08:01:07 +00:00
18 lines
444 B
Markdown
18 lines
444 B
Markdown
# `kumo.string.split_whitespace(STRING)`
|
|
|
|
{{since('2024.09.02-c5476b89')}}
|
|
|
|
Splits `STRING` by whitespace, as defined by the Unicode Derived Core Property `White_Space`.
|
|
If you only want to split on ASCII whitespace, use [split_ascii_whitespace](split_ascii_whitespace.md) instead, as it is cheaper.
|
|
|
|
```lua
|
|
assert(
|
|
kumo.json_encode(kumo.string.split_whitespace 'Mary had a little lamb')
|
|
== '["Mary","had","a","little","lamb"]'
|
|
)
|
|
```
|
|
|
|
|
|
|
|
|