StaticfromCreates a CharSet containing all characters in the given string.
Each character's ASCII code point sets the corresponding bit in the internal 256-bit table. Duplicate characters are harmless.
Returns whether the given byte value is a member of this set.
An ASCII code point (0–255)
A 256-bit lookup table for O(1) ASCII character membership testing.
CharSet stores one bit per possible byte value (0–255) in a compact 32-byte Uint8Array. Membership tests are a single array lookup and bit mask — no hashing, no branching, no string allocation.
Use the from factory to create a CharSet from a string of characters. For common nucleotide groupings, use the pre-built sets in Bases instead of constructing your own.
Example