Module transform

Source
Expand description

Operations to transform strings, including the map function.

Contains unicode normalization functionality.

Modules§

advanced
The “advanced” interface to transformations, producing potentially non-UTF8 data.
buffer
Implements the MaybeUninitSliceExt extension type.

Structs§

CompositionOptions
Controls Unicode composition and decomposition.
DecomposedChar
An array of codepoints, resulting from the decompose_char function.
InsufficientSpaceError
Indicates that there was insufficient space in the destination buffer, and indicates the amount of space that would be necessary.
TransformOptions
Options for the map, decompose_buffer, and decompose_char functions.

Enums§

CompositionDirection
Controls whether composition or decomposition is being performed.
NlfConversionMode
Indicates how NLF-sequences (LF, CRLF, CR, NEL) should be converted.
UnassignedCodepointHandling
Indicates how to handle unassigned codepoints.
UnicodeNormalizationForm
The type of [unicode normalization form].

Functions§

decompose_buffer
Decompose a UTF8 string into an array of codepoints, applying the specified TransformOptions.
decompose_char
Decompose a codepoint into an array of codepoints, applying the specified TransformOptions.
map
Apply a transformation to a string, indicated by the TransformOptions.
map_into
Apply a transformation to a string, indicated by the TransformOptions, writing the result into the specified destination string.
normalize
Apply normalization to the specified string.
normalize_utf32
Normalize a buffer of MaybeMarkerCodepoint in-place, respecting the TransformOptions

Type Aliases§

TransformCallback
A callback to a transform function, allowing the user to change codepoints before utf8proc starts processing them.