Class StringUtils
java.lang.Object
org.sonar.java.checks.helpers.StringUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcountMatches(String string, String pattern) Count non-overlapping occurrences ofpatternin thestring.static String[]Build String[] by concatenating arguments of types: java.lang.String java.lang.String[] java.util.Collectioninvalid input: '<'java.lang.strings> Nested collections and arrays are not supported, and will throw an ArrayStoreException if encountered.static booleanCheck if the string is null or empty.
-
Method Details
-
isEmpty
Check if the string is null or empty. -
countMatches
-
flatten
Build String[] by concatenating arguments of types:- java.lang.String
- java.lang.String[]
- java.util.Collectioninvalid input: '<'java.lang.strings>
- Throws:
IllegalArgumentException- If one of the argument is not of the supported types.ArrayStoreException- If a collection passed as argument contains an element that is not a String.
-