Package org.nuxeo.common.utils
Class StringUtils
- java.lang.Object
-
- org.nuxeo.common.utils.StringUtils
-
public final class StringUtils extends Object
Utils for String manipulations.- Author:
- Anahide Tchertchian, Bogdan Stefanescu
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
expandVars(String expression, Map<?,?> properties)
Expands any variable found in the given expression with the values in the given map.static String[]
split(String str, char delimiter, boolean trim)
static List<String>
split(String str, char delimiter, char escape, boolean trim)
Split the given string.static String
toAscii(String s)
Replaces accented characters from a non-null String by their ascii equivalent.static String
toAscii(String s, boolean normalize)
Replaces accented characters from a non-null String by their ascii equivalent.
-
-
-
Method Detail
-
toAscii
public static String toAscii(String s, boolean normalize)
Replaces accented characters from a non-null String by their ascii equivalent.- Parameters:
normalize
- if true, normalize the string using NFC- Since:
- 7.1
-
toAscii
public static String toAscii(String s)
Replaces accented characters from a non-null String by their ascii equivalent.
-
split
public static List<String> split(String str, char delimiter, char escape, boolean trim)
Split the given string.- Parameters:
str
- the string to splitdelimiter
- the delimiter to split withescape
- the character used to escape the delimitertrim
- trim the extracted segments- Returns:
- the list of strings computed by splitting this string
- Since:
- 9.1
-
-