Important String Functions in JAVA


1 toUpperCase()   ::  Convert string to upper case

2 toLowerCase()   ::  Convert string to lower case

3 valueOf              :: Convert given value to string.

4 equals                :: Check  2 strings are equal or not.

5 equalsWithIgnoreCase ::  Check  2 strings are equal or not(case insensitive).

6 subString  ::    return substring to given string.

7 Replace    :: replace a value in given styring.

8 trim()       :: is used to removing blanks from start and end of string.

9 Split()      :: split string on basis of given regular exp.

10 Length     :: return length of the string

11 Concat :: Concatenate the two string. 
 
12 IndexOf :  to find the index of first occurrence of character.

13 LastIndexOf : to find the index of first occurrence of character.


No comments :

No comments :

Post a Comment