类 StringUtils


  • public final class StringUtils
    extends Object
    StringUtils
    • 字段详细资料

      • EMPTY_STRING_ARRAY

        public static final String[] EMPTY_STRING_ARRAY
    • 方法详细资料

      • isBlank

        public static boolean isBlank​(String str)
      • isEmpty

        public static boolean isEmpty​(String str)
        is empty string.
        参数:
        str - source string.
        返回:
        is empty.
      • isNotEmpty

        public static boolean isNotEmpty​(String str)
        is not empty string.
        参数:
        str - source string.
        返回:
        is not empty.
      • isEquals

        public static boolean isEquals​(String s1,
                                       String s2)
        参数:
        s1 -
        s2 -
        返回:
        equals
      • isInteger

        public static boolean isInteger​(String str)
        is integer string.
        参数:
        str -
        返回:
        is integer
      • parseInteger

        public static int parseInteger​(String str)
      • isJavaIdentifier

        public static boolean isJavaIdentifier​(String s)
        Returns true if s is a legal Java identifier.

        more info.

      • isContains

        public static boolean isContains​(String values,
                                         String value)
      • isContains

        public static boolean isContains​(String[] values,
                                         String value)
        参数:
        values -
        value -
        返回:
        contains
      • isNumeric

        public static boolean isNumeric​(String str)
      • toString

        public static String toString​(Throwable e)
        参数:
        e -
        返回:
        string
      • toString

        public static String toString​(String msg,
                                      Throwable e)
        参数:
        msg -
        e -
        返回:
        string
      • translat

        public static String translat​(String src,
                                      String from,
                                      String to)
        translat.
        参数:
        src - source string.
        from - src char table.
        to - target char table.
        返回:
        String.
      • split

        public static String[] split​(String str,
                                     char ch)
        split.
        参数:
        ch - char.
        返回:
        string array.
      • join

        public static String join​(String[] array)
        join string.
        参数:
        array - String array.
        返回:
        String.
      • join

        public static String join​(String[] array,
                                  char split)
        join string like javascript.
        参数:
        array - String array.
        split - split
        返回:
        String.
      • join

        public static String join​(String[] array,
                                  String split)
        join string like javascript.
        参数:
        array - String array.
        split - split
        返回:
        String.
      • getQueryStringValue

        public static String getQueryStringValue​(String qs,
                                                 String key)
      • parseQueryString

        public static Map<String,​String> parseQueryString​(String qs)
        parse query string to Parameters.
        参数:
        qs - query string.
        返回:
        Parameters instance.
      • camelToSplitName

        public static String camelToSplitName​(String camelName,
                                              String split)
      • toArgumentString

        public static String toArgumentString​(Object[] args)
      • toOSStyleKey

        public static String toOSStyleKey​(String key)