Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CharacterClassifier<T>

A fast character classifier that uses a compact array for ASCII values.

Type parameters

  • T: number

Hierarchy

  • CharacterClassifier

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _asciiMap

_asciiMap: Uint8Array

Maintain a compact (fully initialized ASCII map for quickly classifying ASCII characters - used more often in code).

Protected _defaultValue

_defaultValue: number

Protected _map

_map: Map<number, number>

The entire map (sparse array).

Methods

get

  • get(charCode: number): T

set

  • set(charCode: number, _value: T): void

Static Private _createAsciiMap

  • _createAsciiMap(defaultValue: number): Uint8Array