Strip

Java-Strip

Strip The strip( ) method of String is used to remove the leading and trailing white spaces in the string . For example: StripLeading The stripLeading( ) method of String is used to remove the leading white spaces in the string. For example: StripTrailing The stripTrailing( ) method of String is used to remove the trailing white … Read more…

Split

Java-Split

Split The split() method of String is used to split the string around matches of the given regular expression. It has the following form: The array returned by this method contains each substring of this string that is terminated by another substring that matches the given expression or is terminated by the end of the string. … Read more…

Java-Case Conversions

Case Conversions As the Java language is case sensitive, it differentiates uppercase letters from lowercase letters. The String class provides two methods, namely toLowerCase( ) and toUpperCase( ) to facilitate case conversions. While the toLowerCase( ) method converts all the letters of the given string to lower case, the toUpperCase( ) method does just the … Read more…