rfind_utf8_end

Function rfind_utf8_end 

Source
pub fn rfind_utf8_end(buf: &[u8]) -> usize
Expand description

Find the end of the last valid UTF-8 code point.

§Deprecated

This function will not be part of the public API in a future release.

§Parameters

  • buf: This should be an almost-valid UTF-8 encoded sequence. The final bytes can be a UTF-8 multi-byte sequence which is incomplete.

§Returns

The number of code units which are valid UTF-8 (assuming buf adheres to the above specification).