String in Java Archive
Description: This method converts this string to a new character array. Syntax: Here is the syntax of this method: public char toCharArray() Parameters: Here is the detail of parameters: NA Return Value: It returns a …
Description: This method has two variants and returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this …
Description: This method returns a new character sequence that is a subsequence of this sequence. Syntax: Here is the syntax of this method: public CharSequence subSequence(int beginIndex, int endIndex) Parameters: Here is the detail of …
Description: This method has two variants and tests if a string starts with the specified prefix beginning a specified index or by default at the beginning. Syntax: Here is the syntax of this method: public …
Description: This method has two variants and splits this string around matches of the given regular expression. Syntax: Here is the syntax of this method: public String split(String regex, int limit) or public String split(String …
Description: This method replaces the first substring of this string that matches the given regular expression with the given replacement. Syntax: Here is the syntax of this method: public String replaceFirst(String regex, String replacement) Parameters: …
Description: This method replaces each substring of this string that matches the given regular expression with the given replacement. Syntax: Here is the syntax of this method: public String replaceAll(String regex, String replacement) Parameters: Here …