Helper methods for String class