String Processing Flashcards
Returns the starting position of a substring within a string, or -1 if not found. Has overloaded version that can specify starting index.
int indexOf(substring)
Starting from offset, check if the string has a prefixString
boolean startsWith(String prefixString, int offset)
Starting from 0, checks if the string has prefixString.
boolean startsWith(String prefixString)
Check if the string has a suffixString.
boolean endsWith(String suffixString)
Starting from start in this String object, check if the region of text given by matchingStr matches. In matchStr, check for matchLen characters starting from matchStartOffset. Has an additional first paramater that causes it to ignore case.
boolean regionMatches(boolean ignoreCase, int start, String matchingString, int matchStartOffset, int matchLen)
Converts primitive values to strings.
valueOf(primitive)
Returns an array of substrings of a string split by a delimiter.
String[] split(String delimiter)