Class CharUtils

java.lang.Object
org.sejda.sambox.util.CharUtils

public final class CharUtils extends Object
Utility class providing chars related helper methods
Author:
Andrea Vacondio
  • Field Details

  • Method Details

    • isEndOfName

      public static boolean isEndOfName(int ch)
      Parameters:
      ch - The character
      Returns:
      true if the character terminates a PDF name, otherwise false.
    • isEOF

      public static boolean isEOF(int c)
      Parameters:
      c -
      Returns:
      true if the char is end of file
    • isEOL

      public static boolean isEOL(int c)
      Parameters:
      c - The character to check against end of line
      Returns:
      true if the character is a line feed or a carriage return
    • isLineFeed

      public static boolean isLineFeed(int c)
    • isCarriageReturn

      public static boolean isCarriageReturn(int c)
    • isWhitespace

      public static boolean isWhitespace(int c)
      This will tell if a character is whitespace or not. These values are specified in table 1 (page 12) of ISO 32000-1:2008.
      Parameters:
      c - The character to check against whitespace
      Returns:
      true if the character is a whitespace character.
    • isNul

      public static boolean isNul(int c)
    • isSpace

      public static boolean isSpace(int c)
      Parameters:
      c - The character to check against space
      Returns:
      true if the character is a space character.
    • isDigit

      public static boolean isDigit(int c)
      Parameters:
      c - The character to be checked
      Returns:
      true if the character is a digit.
    • isLetter

      public static boolean isLetter(int c)
      Parameters:
      c - The character to be checked
      Returns:
      true if the character is a letter (case unsensitive).
    • isOctalDigit

      public static boolean isOctalDigit(int c)
      Parameters:
      c - The character to be checked
      Returns:
      true if the character is an octal digit.
    • isHexDigit

      public static boolean isHexDigit(int c)
      Parameters:
      c - The character to be checked
      Returns:
      true if the character is an hex digit.
    • isBlank

      public static boolean isBlank(CharSequence cs)