|
|
Returns a substring of a source string.
str (source position length)
str:str (source:str position:u16 length:u16)
- source
The string from which to extract the substring.
- position
The index of the first character to extract. String indices are
1-based. (That is, indices are 1, 2, 3, ... rather than
0, 1, 2, ...)
- length
The number of characters to extract. If this value is larger than the
actual number of characters in the string, the string is returned from
the starting position to the end without an error indication.
$nmdebug > = str("I am sincere.", 6, 3)
"sin"
Starting at position 6, extract the next three characters.
$nmdebug > = str("Hello mom! I don't know how long this is", 7, 1000)
"mom! I don't know how long this is"
Extract the remainder of the string starting at position 7.
None
|