Skip to content
Snippets Groups Projects
Commit 0159ed3e authored by Agustin Chiappe Berrini's avatar Agustin Chiappe Berrini
Browse files

Add `split_at` at manual

parent 26af2f91
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment