Skip to main content

Module ascii

Module ascii 

Source
Expand description

Operations on ASCII [u8].

Structsยง

EscapeAscii
An iterator over the escaped version of a byte slice.
EscapeByte ๐Ÿ”’
SplitAsciiWhitespaceExperimental
An iterator over the non-ASCII-whitespace subslices of a byte slice, separated by any amount of ASCII whitespace.

Constantsยง

SSE2_CHUNK_SIZE ๐Ÿ”’ x86-64 and sse2
Chunk size for SSE2 vectorized ASCII checking (4x 16-byte loads).

Functionsยง

is_ascii ๐Ÿ”’ AArch64 and neon, or x86-64 and sse2
Uses explicit SIMD intrinsics to prevent LLVM from auto-vectorizing with broken code (e.g., AVX-512 on x86-64 that extracts mask bits one-by-one).
is_ascii_sse2 ๐Ÿ”’ x86-64 and sse2
is_ascii_simple ๐Ÿ‘ป Experimental
ASCII test without the chunk-at-a-time optimizations.