String.substr

string.substr(START, LENGTH)

This function returns a subset of a string. The first argument is the start position (zero-based) and the second (optional) parameter is how many characters to return. If you don't hand in a second parameter, it returns all the characters from the start index to the end of the string.

For example:

Wait, how is this different from String.substring? They're nearly the same, but only differ in the second parameter. Substr says 'start at fourth street and walk five blocks'. Substring says 'start at fourth street and walk until ninth street'. You can use whichever one you prefer.