Searched refs:decode_last_utf8 (Results 1 – 3 of 3) sorted by relevance
/external/rust/crates/regex/src/ |
D | utf8.rs | 121 pub fn decode_last_utf8(src: &[u8]) -> Option<(char, usize)> { in decode_last_utf8() function 153 decode_last_utf8, decode_utf8, TAG_CONT, TAG_FOUR, TAG_THREE, TAG_TWO, 173 decode_last_utf8(&tmp[..encoded_len]).unwrap(); in prop_roundtrip_last() 208 let (got_cp, _) = decode_last_utf8(&tmp[..n]).unwrap(); in prop_decode_last_matches_std() 244 assert_eq!(decode_last_utf8(&[0xFF]), None); in reject_invalid_last() 246 assert_eq!(decode_last_utf8(&[0xED, 0xA0, 0x81]), None); in reject_invalid_last() 248 assert_eq!(decode_last_utf8(&[0xC3]), None); // 2 bytes in reject_invalid_last() 249 assert_eq!(decode_last_utf8(&[0xEF, 0xBF]), None); // 3 bytes in reject_invalid_last() 250 assert_eq!(decode_last_utf8(&[0xF4, 0x8F, 0xBF]), None); // 4 bytes in reject_invalid_last() 252 assert_eq!(decode_last_utf8(&[TAG_TWO, TAG_CONT | b'a']), None); in reject_invalid_last() [all …]
|
D | input.rs | 11 use utf8::{decode_last_utf8, decode_utf8}; 174 decode_last_utf8(&self[..at.pos()]).map(|(c, _)| c).into() in previous_char() 267 decode_last_utf8(&self[..at.pos()]).map(|(c, _)| c).into() in previous_char()
|
/external/rust/crates/bstr/src/ |
D | lib.rs | 405 decode as decode_utf8, decode_last as decode_last_utf8, CharIndices,
|