String.slice
slice — Slices out a part of a string and returns it.
Description
String.slice(integer begin, [integer end])
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
begin | integer | No | ||
end | integer | Yes |
Positive values count from beginning of string, whele negative count from the end.
Return values
string primitive.
Examples
Example #1 – slice example