Enum Class StringConsts

java.lang.Object
java.lang.Enum<StringConsts>
com.end0katz.blobj.StringConsts
All Implemented Interfaces:
Serializable, Comparable<StringConsts>, Constable

@Group public enum StringConsts extends Enum<StringConsts>
Class to contain constants and methods related to strings.
  • Field Details

    • codePoints

      public static final int codePoints
      The number of code points in unicode. Code points are zero-indexed, so the biggest code point is this minus 1
      See Also:
    • allUnicodeChars

      public static final String allUnicodeChars
      String containing every single unicode code point.
    • allDefinedChars

      public static final String allDefinedChars
      String containing all defined code points.
    • allAsciiChars

      public static final String allAsciiChars
      List of all ASCII characters
  • Constructor Details

    • StringConsts

      private StringConsts()
  • Method Details

    • values

      public static StringConsts[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StringConsts valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • allUnicodeChars

      public static String allUnicodeChars(Function<Character,Boolean> filter)
      Return all unicode chars matching a filter.
      Parameters:
      filter - filter to determine if the character gets in.
      Returns:
      the filtered list of unicode chars.
      See Also:
    • codePointsOfBlock

      public static String codePointsOfBlock(Character.UnicodeBlock block)
      Return a string consisting of all the code points in a Character.UnicodeBlock.
      Parameters:
      block - the UnicodeBlock to list the characters of.
      Returns:
      a string consisting of all the code points.