Class StringUtils

    • 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 split
        delimiter - the delimiter to split with
        escape - the character used to escape the delimiter
        trim - trim the extracted segments
        Returns:
        the list of strings computed by splitting this string
        Since:
        9.1
      • split

        public static String[] split​(String str,
                                     char delimiter,
                                     boolean trim)
      • expandVars

        public static String expandVars​(String expression,
                                        Map<?,​?> properties)
        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 expand
        properties - a map containing variables