-
Notifications
You must be signed in to change notification settings - Fork 0
_substring
Patrick Duncan edited this page Nov 18, 2018
·
1 revision
Extracts characters from a string, between an inclusive lower and exclusive upper bound. If the lower bound is not specified it is assumed to be 0. If the upper bound is not specified it is assumed to be the length of the string. A newline is not included.
_substring <string> [lower] [upper]
Code | Result |
---|---|
_substring hello |
hello |
_substring 'hello' 2 |
llo |
_substring 'Big Rock' 1 5 |
ig R |
Reason | Error Code |
---|---|
[lower] was not 0-9 | 1 |
[upper] was not 0-9 | 1 |
[lower] was less than 0 | 1 |
[lower] was greater than [upper] | 1 |