CharValidator

Validates characters that are processed by tokenizers.

Description

The CharValidator class allows you to validate characters that are processed by tokenizers.

Constructors

Creates a new instance of this class.

CharValidator()

Fields

Eof

EOF

Eof: int = 0xffff

Zero

Zero

Zero: int = ord(‘0’)

Nine

Nine

Nine: int = ord(‘9’)

Static methods

is_eof

Checks if a character is an EOF.

is_eof(value: int): bool

  • value: int - value to check
  • returns: bool - validation result

is_eol

Checks if a character is an EOL.

is_eol(value: int): bool

  • value: int - value to check
  • returns: bool - validation result

is_digit

Checks if a character is a digit.

is_digit(value: int): bool

  • value: int - value to check
  • returns: bool - validation result