Package com.pi4j.util

Class StringUtil


  • public class StringUtil
    extends Object
    • Constructor Detail

      • StringUtil

        public StringUtil()
    • Method Detail

      • isNullOrEmpty

        public static boolean isNullOrEmpty​(String data,
                                            boolean trim)
      • isNullOrEmpty

        public static boolean isNullOrEmpty​(String data)
      • isNotNullOrEmpty

        public static boolean isNotNullOrEmpty​(String data)
      • isNotNullOrEmpty

        public static boolean isNotNullOrEmpty​(String data,
                                               boolean trim)
      • contains

        public static boolean contains​(String source,
                                       String target)
      • contains

        public static boolean contains​(String source,
                                       String[] targets)
      • contains

        public static boolean contains​(String[] sources,
                                       String target)
      • contains

        public static boolean contains​(String[] sources,
                                       String[] targets)
      • create

        public static String create​(int length)
      • create

        public static String create​(char c,
                                    int length)
      • create

        public static String create​(String s,
                                    int length)
      • repeat

        public static String repeat​(char c,
                                    int length)
      • padLeft

        public static String padLeft​(String data,
                                     int length)
      • padLeft

        public static String padLeft​(String data,
                                     char pad,
                                     int length)
      • padRight

        public static String padRight​(String data,
                                      int length)
      • padRight

        public static String padRight​(String data,
                                      char pad,
                                      int length)
      • pad

        public static String pad​(String data,
                                 int length)
      • pad

        public static String pad​(String data,
                                 char pad,
                                 int length)
      • padCenter

        public static String padCenter​(String data,
                                       int length)
      • padCenter

        public static String padCenter​(String data,
                                       char pad,
                                       int length)
      • trimLeft

        public static String trimLeft​(String data,
                                      char trim)
      • trimRight

        public static String trimRight​(String data)
      • trimRight

        public static String trimRight​(String data,
                                       char trim)
      • trim

        public static String trim​(String data,
                                  char trim)
      • center

        public static String center​(String text,
                                    int length)
      • byteArrayToHex

        public static String byteArrayToHex​(byte[] data)
      • byteArrayToHex

        public static String byteArrayToHex​(byte[] data,
                                            CharSequence delimiter)