pub fn decompose_buffer<'a>(
text: &BStr,
buffer: &'a mut MaybeUninitSlice<char>,
options: &TransformOptions,
func: Option<TransformCallback<'_>>,
) -> Result<SplitInitBuffer<'a, char>, TransformBufferError>
Expand description
Decompose a UTF8 string into an array of codepoints,
applying the specified TransformOptions
.
The specified string is not statically required to be UTF8.
If invalid UTF8 is encountered,
a ErrorKind::InvalidUtf8
will be returned.
The result is guaranteed to only contain valid codepoints.
May apply a user-specified transformation to each codepoint, before utf8proc does its own transformations.
ยงLimitations
In order to guarantee the result is valid UTF8, some options are forbidden. Use the advanced interface to work around this.