public class StringUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<java.lang.String> |
alphanumComparator |
static java.util.Comparator<java.io.File> |
alphanumFileComparator |
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsWhiteSpace(java.lang.String testCode) |
static double |
getOrthographicScore(java.lang.String str) |
static boolean |
hasDigits(java.lang.String string) |
static boolean |
hasSpecialCharacters(java.lang.String string) |
static int |
nbDigits(java.lang.String str) |
static int |
nbDigitSequences(java.lang.String string) |
static int |
nbSpecialCharacters(java.lang.String string) |
static java.lang.String |
readFile(java.lang.String path,
java.nio.charset.Charset encoding)
Read a file to a string
|
static java.lang.String |
replaceAccents(java.lang.String string) |
static java.lang.String |
replaceLast(java.lang.String string,
java.lang.String toReplace,
java.lang.String replacement) |
static java.lang.String |
toOnelineSentences(java.lang.String string)
Collapse all sequences of line breaks into one single line break.
|
public static java.util.Comparator<java.lang.String> alphanumComparator
public static java.util.Comparator<java.io.File> alphanumFileComparator
public static boolean containsWhiteSpace(java.lang.String testCode)
public static java.lang.String replaceAccents(java.lang.String string)
public static int nbSpecialCharacters(java.lang.String string)
public static java.lang.String toOnelineSentences(java.lang.String string)
string
- public static boolean hasSpecialCharacters(java.lang.String string)
public static java.lang.String readFile(java.lang.String path, java.nio.charset.Charset encoding) throws java.io.IOException
path
- encoding
- java.io.IOException
public static boolean hasDigits(java.lang.String string)
public static int nbDigitSequences(java.lang.String string)
public static double getOrthographicScore(java.lang.String str)
public static int nbDigits(java.lang.String str)
public static java.lang.String replaceLast(java.lang.String string, java.lang.String toReplace, java.lang.String replacement)