diff --git a/manual/src/ch05-05-method.md b/manual/src/ch05-05-method.md index 762c2a179f8e363c894f2ccf2c49a3666b800d91..51864ab647921f74d59c77ab691c80e01224bb6b 100644 --- a/manual/src/ch05-05-method.md +++ b/manual/src/ch05-05-method.md @@ -456,6 +456,7 @@ echo $unescape($line) The following are the currently-supported array methods. - [split](#split) +- [split_at](#split_at) - [bytes](#bytes) - [chars](#chars) - [graphemes](#graphemes) @@ -489,6 +490,28 @@ age data ``` +### split_at + +Defaults to string variables. The supplied string will be split in two pieces, from the index specified in the second argument. + +#### Examples + +``` +echo @split_at("FOOBAR", "3") +echo @split_at("FOOBAR") +echo @split_at("FOOBAR", "-1") +echo @split_at("FOOBAR", "8") +``` + +#### Output + +``` +FOO BAR +ion: split_at: requires an argument +ion: split_at: requires a valid number as an argument +ion: split_at: value is out of bounds +``` + ### bytes Defaults to string variables. Returns an array where the given input string is split by bytes and