Cut the original string into two parts: what's before and what's after the specified token. You can specify where the token will be included.
The point where to cut the string.
If set to true (default) then the specified token is placed in the "after" part.
A two element array, the first element is the "before" part, the second the "after".
Like calling splitWithIndexes()
but returns raw tokens instead of objects.
The string to work on.
The regular expression to parse with.
Maxium number of elements to return.
How the limit argument should be applied.
The parsed tokens.
Performs a split using a regular expression returing tokens with index data.
The string to work on.
The regular expression to parse with.
Maxium number of elements to return.
How the limit argument should be applied.
An array of tokens splitted from the input string. Each item contains start and end indexes.
Returns a substring of the original string starting from token start
.
If end
is supplied then the substring ends after that token.
If start
is undefined
then ""
is returned,
If end
is not given then the remaining string is returned.
This method (like others) assumes that start and end refer to the same string. If it's not the case then unpredicatable results will occur.
The token to start from (inclusive).
The token to stop at (inclusive). If not given all the remaining string is returned.
The original string section starting at the token at index
Generated using TypeDoc
Library entry point. Expose static methods for different operations.