Added methods to String class