Implement -[substringFromIndex:toIndex:] for OFString.