substr
substr(string, n1[, n2])
This function extracts a substring from string, starting at position n1, of n2 characters. The first character of string is position 1. If n1 is larger than length(string), the null string is returned. If n1+n2 is longer than string, then the remainder of string is returned. The n2 argument is optional; if omitted, the remainder of the string is returned.
For example, the value of substr("rnotes9302", 2, 5) is "notes".