Class StringUtil


  • public final class StringUtil
    extends Object
    • Constructor Detail

      • StringUtil

        public StringUtil()
    • Method Detail

      • getBytesUtf8

        public static byte[] getBytesUtf8​(String content)
      • newStringUtf8

        public static String newStringUtf8​(byte[] bytes)
      • isEmpty

        public static boolean isEmpty​(CharSequence cs)
      • isBlank

        public static boolean isBlank​(CharSequence cs)
      • isNotBlank

        public static boolean isNotBlank​(CharSequence cs)
      • uncapitalize

        public static String uncapitalize​(String str)
      • capitalize

        public static String capitalize​(String str)
      • substringBefore

        public static String substringBefore​(String str,
                                             String separator)
      • join

        public static String join​(Object[] array,
                                  char separator)
      • join

        public static String join​(Object[] array,
                                  char separator,
                                  int startIndex,
                                  int endIndex)
      • join

        public static String join​(Iterable<?> iterable,
                                  char separator)
      • join

        public static String join​(Iterator<?> iterator,
                                  char separator)
      • join

        public static String join​(int[] array,
                                  char separator)
      • join

        public static String join​(int[] array,
                                  char separator,
                                  int startIndex,
                                  int endIndex)
      • simpleClassName

        public static String simpleClassName​(Class<?> clazz)
        Generates a simplified name from a Class. Similar to Class.getSimpleName(), but it works fine with anonymous classes.
      • tokenizeToStringArray

        public static String[] tokenizeToStringArray​(String str,
                                                     String delimiters)
      • tokenizeToStringArray

        public static String[] tokenizeToStringArray​(String str,
                                                     String delimiters,
                                                     boolean trimTokens,
                                                     boolean ignoreEmptyTokens)