Class StringUtil

java.lang.Object
org.webpki.util.StringUtil

public class StringUtil extends Object
  • Constructor Details

    • StringUtil

      public StringUtil()
  • Method Details

    • splitAtAny

      public static String[] splitAtAny(String s, String[] delimiters, boolean includeEmpty)
    • splitAtAny

      public static String[] splitAtAny(String s, String[] delimiters)
    • splitAt

      public static String[] splitAt(String s, String delimiter, boolean includeEmpty)
    • splitAt

      public static String[] splitAt(String s, String delimiter)
    • tokenVector

      public static String[] tokenVector(String s, String delimiters)
    • tokenVector

      public static String[] tokenVector(String s)
    • tokenList

      public static String tokenList(String[] list)
    • charSet

      public static BitSet charSet(String s)
    • firstMember

      public static int firstMember(String s, BitSet charSet, int startOffset)
    • firstMember

      public static int firstMember(String s, BitSet charSet)
    • firstMember

      public static int firstMember(String s, String charSet)
    • firstNonMember

      public static int firstNonMember(String s, BitSet charSet, int startOffset)
    • firstNonMember

      public static int firstNonMember(String s, BitSet charSet)
    • firstNonMember

      public static int firstNonMember(String s, String charSet)
    • hasOnlyLegalChars

      public static boolean hasOnlyLegalChars(String s, BitSet allowedChars)
    • hasOnlyLegalChars

      public static boolean hasOnlyLegalChars(String s, String allowedChars)
    • checkAllowedChars

      public static void checkAllowedChars(String s, BitSet allowedChars)
    • checkAllowedChars

      public static void checkAllowedChars(String s, String allowedChars)
    • checkRemovePrefix

      public static String checkRemovePrefix(String original, String prefix)
    • javaUnescape

      public static String javaUnescape(String s)
    • padLeft

      public static String padLeft(String s, int length, char padChar)
    • zeroPaddedNumber

      public static String zeroPaddedNumber(int n, int length)
    • zeroPaddedHex

      public static String zeroPaddedHex(int n, int length)
    • zeroPaddedBinary

      public static String zeroPaddedBinary(int n, int length)
    • readFile

      public static String[] readFile(File file) throws IOException
      Throws:
      IOException
    • readFile

      public static String[] readFile(String filename) throws IOException
      Throws:
      IOException