Simple Solution
  • Java
  • Spring
  • Spring Boot
  • Tutorials
  • Tags
Java Checks if a String contains all words in array using Apache Commons Text
Java Checks if a String contains all words in array using Apache Commons Text

In this article we show how to check if a String contains all words in an array in Java. By using WordUtils utility class of Apache Commons Text library you can check if the String contains all words in the given array using containsAllWords() method.

Wrap a line of text into multiple lines in Java using Apache Commons Text
Wrap a line of text into multiple lines in Java using Apache Commons Text

In this post we learn how to wrap a String in Java using WordUtils utility class of Apache Commons Text library. By using WordUtils.wrap() method we can break a long line of text into multiple lines with a given input text and the length. The output String will be wrapped words and separated by system line separator character or by your custom provided separator.

Generate Random String in Java using Apache Commons Text
Generate Random String in Java using Apache Commons Text

In this article we show how to generate random String values in Java using the RandomStringGenerator class of Apache Commons Text library. We provide multiple Java code examples with different settings to generate different kinds of data that may be useful for your daily programming scenarios.

Capitalize First Letter of each Word of String in Java using Apache Commons Text
Capitalize First Letter of each Word of String in Java using Apache Commons Text

In this article we show how to use WordUtils utility class of Apache Commons Text library to capitalize the first character of each word in a Java String. We will provide Java code examples to show how to use capitalize() and capitalizeFully() methods of the library’s WordUtils utility class.

Capitalize First Letter of a String in Java using Apache Commons Lang
Capitalize First Letter of a String in Java using Apache Commons Lang

In this article we show how to use StringUtils of Apache Commons Lang library to capitalize the first character of a Java String by using StringUtils.capitalize() utility method.

Abbreviates a String using ellipses in Java using Apache Commons Lang
Abbreviates a String using ellipses in Java using Apache Commons Lang

In this post we show how to use Apache Commons Lang library to abbreviate a String using ellipses. We provide multiple Java code examples on how to use StringUtils.abbreviate() utility method to achieve our goal.

Check if a String is a valid numeric value in Java using Apache Commons Lang
Check if a String is a valid numeric value in Java using Apache Commons Lang

In this article we show you how to use different utility classes in Apache Commons Lang library to check if a String is a valid number in Java. We provide different working code examples how to use methods such as NumberUtils.isCreatable(), NumberUtils.isDigits() or StringUtils.isNumeric().

Check if a String contains another String in Java
Check if a String contains another String in Java

Core Java classes provide different solutions that developers can use to check if a String contains another String inside it. In this article we will show you different Java code examples how to check if a String is inside another String using core Java methods such as String.contains(), String.indexOf(), String.lastIndexOf(), String.matches() and java.util.regex.Pattern class.

Replace or Remove All Digits of a String in Java using regular expression
Replace or Remove All Digits of a String in Java using regular expression

In this article we are going to learn how to use core Java classes to remove all numeric characters from a String or replace numeric characters with other characters. We will show you different Java code examples how to use String.replaceAll() method and java.util.regex.Pattern class.

Extract Digits from a String in Java using regular expression
Extract Digits from a String in Java using regular expression

In this post we show you how to use regular expressions to remove all non-digits characters of a String and return the number only String in Java application.

  • 1
  • 2
  • 3
  • …
  • 89
  • 90
  • 91
  • …
  • 99

Copyright © 2019 SimpleSolution.dev. All Rights Reserved.