The replace and replaceAll methods of the String class
【Java】I created a sample using replace() and replaceAll() in the String class.
Using the matches method of the String class
【Java】I have created a sample that uses the String#matches method to determine if a string satisfies a certain condit ...
Using the split method of the String class
【Java】I have created a sample that splits a string using the String#split method.
Remove leading whitespace from a string
【Java】We have created a sample method to remove whitespace from the left or right edge only.
Compare strings
【Java】I used the String#compareTo method to compare strings.
Determine the prefix
【Java】I have created a sample that uses the String#startsWith() method to determine the prefix.
Extract a portion of a string
【Java】We have created a sample that uses the String#substring() method to extract a portion of a string.
Extract a part of a string from the middle to the end.
【Java】We have created a sample that uses the String#substring() method (one argument) to extract the middle to the en ...
Extract a character from a string
【Java】We have created a sample that uses String#charAt() to extract a single character.