Class CharacterUtils

java.lang.Object
panda.utilities.CharacterUtils

public final class CharacterUtils extends Object
  • Field Details

    • DIGITS

      public static final char[] DIGITS
    • LETTERS

      public static final char[] LETTERS
    • LITERALS

      public static final char[] LITERALS
    • TAB

      public static final char TAB
      See Also:
    • BACKSPACE

      public static final char BACKSPACE
      See Also:
    • NO_BREAK_SPACE

      public static final char NO_BREAK_SPACE
      See Also:
  • Method Details

    • isWhitespace

      public static boolean isWhitespace(char c)
      Parameters:
      c - a character to check
      Returns:
      true if character is whitespace
    • getIndex

      public static int getIndex(char[] characters, char character)
      Index of character in the specified array
      Parameters:
      characters - array of characters
      character - character to check
      Returns:
      index of the specified character or -1 if character is not in the specified array
    • mergeArrays

      public static char[] mergeArrays(char[]... arrays)
      Merge several arrays
      Parameters:
      arrays - arrays to merge
      Returns:
      array of merged arrays
    • arrayOf

      public static char[] arrayOf(char... characters)
      Parameters:
      characters - varargs array of characters
      Returns:
      array of characters
    • belongsToAny

      public static boolean belongsToAny(char character, char[]... characters)
      Parameters:
      character - character to check
      characters - array of character arrays
      Returns:
      true if character is in the specified arrays
    • belongsTo

      public static boolean belongsTo(char character, char... characters)
      Parameters:
      character - character to check
      characters - array of characters
      Returns:
      true if character is in the specified array