Method Summary

String Method

Type Method Description Time Complexity
int length() Returns the length of this string O(1)
char charAt(int index) Returns the char value at the specified index O(1)
boolean equals(Object anObject) Compares this string to the specified object O(n)
String substring(int beginIndex) Returns a new string that is a substring of this string O(n)
String substring(int beginIndex, int endIndex) - ending index, exclusive Returns a new string that is a substring of this string O(n)
char[] toCharArray() Converts this string to a new character array. O(n)
String toLowerCase() Converts all of the characters in this String to lower case using the rules of the default locale O(n)
String toUpperCase() Converts all of the characters in this String to upper case using the rules of the default locale O(n)

Character Method

Type Method Description
static boolean isLetter(char ch) Determines if the specified character is a letter
static boolean isLetterOrDigit(char ch) Determines if the specified character is a letter or digit
static char toLowerCase(char ch) Converts the character argument to lowercase using case mapping information from the UnicodeData file

results matching ""

    No results matching ""