Explorer

core.string-split

description
Split the text by the separator (an empty separator gives [text]). core.eval-value runs it compiled
type
Fn(text: String, separator: String) -> List<String>
expression
fn(text$0, separator$1) =>
  match @core.equal(left: $1, right: "") {
    true =>
      [$0],
    false =>
      @core.string-split-from(text: $0, separator: $1, start: 0, acc: [])
  }
visibility
public
core.string-split (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: 4ottsXHHnPazgnuYz8RVzqVutgSCijpu-H8DzJ1WDDs
content hash: UQgNoLKmyvb2y36ZwI6FiYhCu3G4K3oOhJNTpIOB15E