mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-19 10:58:17 +00:00
302 B
302 B
kumo.string.splitn(STRING, LIMIT, PATTERN)
{{since('dev')}}
Splits STRING by PATTERN, returning an array-style table
holding at most LIMIT substrings.
assert(
kumo.json_encode(kumo.string.splitn('Mary had a little lamb', 3, ' '))
== '["Mary","had","a little lamb"]'
)