Throws an error if a position is not within a string's length.
E.g. given the string "Hello", -5 to 5 are valid positions, others are not.
Throws an error if a position is not within a string's length.
E.g. given the string "Hello", -5 to 5 are valid positions, others are not.