Skip to main content

Module ascii

Module ascii 

Source
Expand description

Operations on ASCII [u8].

Re-exportsยง

use core::ascii::EscapeDefault; ๐Ÿ”’
use crate::fmt; ๐Ÿ”’
use crate::fmt::Write; ๐Ÿ”’
use crate::intrinsics::const_eval_select; ๐Ÿ”’ ExperimentalNot (LoongArch64 and lsx)
use crate::intrinsics::const_eval_select; ๐Ÿ”’ ExperimentalNot (LoongArch64 and lsx)
use crate::ascii; ๐Ÿ”’
use crate::iter; ๐Ÿ”’
use crate::ops; ๐Ÿ”’
use crate::iter::Filter; ๐Ÿ”’
use crate::iter::FusedIterator; ๐Ÿ”’
use crate::slice::Split; ๐Ÿ”’
use crate::str::BytesIsNotEmpty; ๐Ÿ”’
use crate::str::IsAsciiWhitespace; ๐Ÿ”’

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.