LightAndLight / ipso

A functional scripting language.
https://ipso.dev
17 stars 1 forks source link

`string.split` should take a `String` separator #277

Closed LightAndLight closed 1 year ago

LightAndLight commented 1 year ago

Currently string.split : Char -> String -> Array String, but it should be string.split : String -> String -> Array String.

Combined with #272, string.join becomes an inverse of string.split:

string.join sep (string.split sep x) == x

We can also create string.splitc : Char -> String -> Array String for the single-character case.

Tasks