Skip to content

_substring

Patrick Duncan edited this page Nov 18, 2018 · 1 revision

Description

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.

Usage

_substring <string> [lower] [upper]

Examples

Code Result
_substring hello hello
_substring 'hello' 2 llo
_substring 'Big Rock' 1 5 ig R

Errors

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
Clone this wiki locally