Skip to content

Tag Archives: Scala-Strings

The replace() method is used to replace the old character of the string with the new one which is stated in the argument. Method Definition:… Read More
The regionMatches() method is used to check if two string regions are equal or not. However, if ignoreCase is stated true in the argument list… Read More
The regionMatches(int toffset, String other, int offset, int len) method is used to check if two string regions are equal or not. However, here ignoreCase… Read More
The matches() method is used to check if the string stated matches the specified regular expression in the argument or not. Method Definition: Boolean matches(String… Read More
The lastIndexOf(String str, int fromIndex) method is utilized to return the index of the last appearance of the sub-string we specify in the argument from… Read More
The lastIndexOf() method is utilized to return the index of the last appearance of the character we specify in the argument from the index we… Read More
The lastIndexOf() method is utilized to return the index of the last appearance of the character we specify in the argument from the stated string.… Read More
The intern() method is utilized to check the canonical presentation of the string object. Method Definition: String intern() Return Type: It returns the canonical presentation… Read More
The indexOf(String str, int fromIndex) method is utilized to return the index of the sub-string which occurs first from the index we specify in the… Read More
The indexOf(String str) method is utilized to return the index of the sub-string which occurs first in the string stated. Method Definition: indexOf(String str) Return… Read More
The indexOf(int ch, int fromIndex) method is same as indexOf() method but here this method starts finding the character from the index we specify. Method… Read More
The indexOf() method is utilized to find the index of the first appearance of the character in the string and the character is present in… Read More
The hashCode() method is utilized to find the hash code of the stated string. Method Definition: int hashCode() Return Type: It returns an integer hash… Read More
The getBytes() method is utilized to encode a stated string into a series of bytes and then it stores it into a new byte array.… Read More
The compareTo() method is utilized to compare a string with another string. Some points to remember: Here, If a string(S1) is same as string(S2) in… Read More