substr
Summary
Returns a subset of a string starting at the given location through the given number of characters.
Syntax
"string".substr(start [, length])
Parameters
start
- The location to start the subset of characters.
- The number of characters to extract from the string.
var string = "The quick brown fox.";
print(string.substr(0, 3)); // "The"
print(string.substr(4)); // "quick brown fox."
print(string.substr(-3, 10)); // "ox."