JS: String.prototype.substr
str.substr(index, length)
- Return a substring of length length, starting at index
console.log( "abcd".substr(1,2) === "bc" ); // true
console.log( "abcd".substr(1, 9) === "bcd" ); // true // length longer than available, take to the end instead