java.lang.Object
org.sejda.sambox.util.CharUtils
Utility class providing chars related helper methods
- Author:
- Andrea Vacondio
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byte -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisBlank(CharSequence cs) static booleanisCarriageReturn(int c) static booleanisDigit(int c) static booleanisEndOfName(int ch) static booleanisEOF(int c) static booleanisEOL(int c) static booleanisHexDigit(int c) static booleanisLetter(int c) static booleanisLineFeed(int c) static booleanisNul(int c) static booleanisOctalDigit(int c) static booleanisSpace(int c) static booleanisWhitespace(int c) This will tell if a character is whitespace or not.
-
Field Details
-
ASCII_LINE_FEED
public static final byte ASCII_LINE_FEED- See Also:
-
ASCII_FORM_FEED
public static final byte ASCII_FORM_FEED- See Also:
-
ASCII_CARRIAGE_RETURN
public static final byte ASCII_CARRIAGE_RETURN- See Also:
-
ASCII_BACKSPACE
public static final byte ASCII_BACKSPACE- See Also:
-
ASCII_HORIZONTAL_TAB
public static final byte ASCII_HORIZONTAL_TAB- See Also:
-
ASCII_NULL
public static final byte ASCII_NULL- See Also:
-
ASCII_SPACE
public static final byte ASCII_SPACE- See Also:
-
-
Method Details
-
isEndOfName
public static boolean isEndOfName(int ch) - Parameters:
ch- The character- Returns:
trueif the character terminates a PDF name, otherwisefalse.
-
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
-