Skip to main content

text

Function text 

Source
pub fn text(bytes: &[u8]) -> (String, bool)
Expand description

7.3’s text rule: bytes cut to their first CUT bytes at a code point boundary, an invalid byte counting as one code point, then each invalid byte replaced by U+FFFD; and whether it was cut. The string is allocated once, at the length text_len measures.