Package org.nuxeo.common.utils
Class StringUtils
java.lang.Object
org.nuxeo.common.utils.StringUtils
Utils for String manipulations.
- Author:
- Anahide Tchertchian, Bogdan Stefanescu
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
expandVars
(String expression, Map<?, ?> properties) Expands any variable found in the given expression with the values in the given map.static String[]
Split the given string.static String
Replaces accented characters from a non-null String by their ascii equivalent.static String
Replaces accented characters from a non-null String by their ascii equivalent.
-
Method Details
-
toAscii
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
Replaces accented characters from a non-null String by their ascii equivalent. -
split
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
-
split
-
expandVars
Expands any variable found in the given expression with the values in the given map.The variable format is ${property_key}.
- Parameters:
expression
- the expression to expandproperties
- a map containing variables
-