Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7f03fcb

Browse files
committedSep 7, 2019
Strings compareTo()
1 parent 167bae4 commit 7f03fcb

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed
 

‎Readme.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,24 @@
1717
| 8 | `substring(int start, int end)` | It returns the String starting from index 'start' and ending at index 'end - 1' | `String`
1818
| 9 | `substring(int start)` | It returns the String starting at index 'start' until the last character of the String | `String`
1919
| 10 | `equals()` | It returns true if the Strings are same else false | `boolean`
20-
| 11 | `replace(char a, char b)` | It replace all the 'a' character occurrence with 'b' | `String`
21-
| 12 | `replaceAll(String regular_expression, String replacement)` | Replace all the character sequence matching 'regular_expression' with 'replacement' | `String`
22-
| 13 | `replaceAll("//w", "")` | It used for removing all the word characters from the String | `String`
23-
| 14 | `replaceAll("//W", "")` | It used for removing all the characters from the String that are not word characters | `String`
24-
| 15 | `replaceAll("//s", "")` | It used for removing all the white spaces from the String | `String`
25-
| 16 | `replaceAll("[-+.^:,]","")` | It used for removing all the special characters from the String | `String`
26-
| 17 | `replaceAll("\\p{Punct}", "")` | It used for removing all the punctuations from the String | `String`
27-
| 18 | `replaceAll("\\p{Blank}","")` | It used for removing all the spaces and tabs from the String | `String`
28-
| 19 | `trim()` | It removes the leading and trailing spaces from the String | `void`
29-
| 20 | `split(String regular_expression)` | Splits the String at every occurrence of specified regular expression | `String[]`
30-
| 21 | `matches(String regular_expression)` | It returns true if the String matches regular expression else false | `boolean`
31-
| 22 | `indexOf(String s)` | It returns the index of the given String 's' | `int`
32-
| 23 | `indexOf(String s, int startIndex)` | It returns the index of the given String when started from 'startIndex' | `int`
33-
| 24 | `indexOf(char c)` | It returns the index of the given character in the String | `int`
34-
| 25 | `indexOf(char c, int startIndex)` | It returns the index of the given character in the String when started from 'startIndex' | `int`
35-
| 26 | `subSequence(int start, int end)` | It returns character sequence from index 'start' to index 'end-1' | `charSequence`
36-
| 27 | `contains(CharSequence char_set)` | It returns true is the character sequence matches else false | `boolean`
20+
| 11 | `compareTo(String s2)` | It returns -1 if first String is lexicographically smaller than String s2 else it returns 1. It returns 0 in case if both the Strings are same lexicographically | `int`
21+
| 12 | `replace(char a, char b)` | It replace all the 'a' character occurrence with 'b' | `String`
22+
| 13 | `replaceAll(String regular_expression, String replacement)` | Replace all the character sequence matching 'regular_expression' with 'replacement' | `String`
23+
| 14 | `replaceAll("//w", "")` | It used for removing all the word characters from the String | `String`
24+
| 15 | `replaceAll("//W", "")` | It used for removing all the characters from the String that are not word characters | `String`
25+
| 16 | `replaceAll("//s", "")` | It used for removing all the white spaces from the String | `String`
26+
| 17 | `replaceAll("[-+.^:,]","")` | It used for removing all the special characters from the String | `String`
27+
| 18 | `replaceAll("\\p{Punct}", "")` | It used for removing all the punctuations from the String | `String`
28+
| 19 | `replaceAll("\\p{Blank}","")` | It used for removing all the spaces and tabs from the String | `String`
29+
| 20 | `trim()` | It removes the leading and trailing spaces from the String | `void`
30+
| 21 | `split(String regular_expression)` | Splits the String at every occurrence of specified regular expression | `String[]`
31+
| 22 | `matches(String regular_expression)` | It returns true if the String matches regular expression else false | `boolean`
32+
| 23 | `indexOf(String s)` | It returns the index of the given String 's' | `int`
33+
| 24 | `indexOf(String s, int startIndex)` | It returns the index of the given String when started from 'startIndex' | `int`
34+
| 25 | `indexOf(char c)` | It returns the index of the given character in the String | `int`
35+
| 26 | `indexOf(char c, int startIndex)` | It returns the index of the given character in the String when started from 'startIndex' | `int`
36+
| 27 | `subSequence(int start, int end)` | It returns character sequence from index 'start' to index 'end-1' | `charSequence`
37+
| 28 | `contains(CharSequence char_set)` | It returns true is the character sequence matches else false | `boolean`
3738

3839

3940

0 commit comments

Comments
 (0)
Please sign in to comment.