Lines Matching +full:0 +full:x9f

19         self.0.len()  in len()
25 self.len() == 0 in is_empty()
64 /// assert_eq!(s.to_bytes(), "\\xf0\\x9f\\xa6\\x80".as_bytes());
68 for &b in &self.0 { in fmt()
75 0x20..=0x7e => f.write_char(b as char)?, in fmt()
96 /// assert_eq!(s.to_bytes(), "\"\\xf0\\x9f\\x98\\xba\"".as_bytes());
101 for &b in &self.0 { in fmt()
111 0x20..=0x7e => f.write_char(b as char)?, in fmt()
124 &self.0 in deref()
141 BStr::from_bytes(&self.0[index]) in index()
184 c_str.0.as_ptr() in as_char_ptr_in_const_context()
221 if self.0.is_empty() { in len_with_nul()
227 self.0.len() in len_with_nul()
233 self.len() == 0 in is_empty()
263 if bytes[bytes.len() - 1] != 0 { in from_bytes_with_nul()
266 let mut i = 0; in from_bytes_with_nul()
270 if bytes[i] == 0 { in from_bytes_with_nul()
318 &self.0[..self.len()] in to_bytes()
333 &self.0 in to_bytes_with_nul()
355 /// let cstr = CStr::from_bytes_with_nul(b"foo\0")?;
405 self.0.make_ascii_lowercase(); in make_ascii_lowercase()
420 self.0.make_ascii_uppercase(); in make_ascii_uppercase()
468 /// assert_eq!(s.to_bytes_with_nul(), "\\xf0\\x9f\\x90\\xa7\0".as_bytes());
472 /// assert_eq!(s.to_bytes_with_nul(), "so \"cool\"\0".as_bytes());
477 if (0x20..0x7f).contains(&c) { in fmt()
498 /// assert_eq!(s.as_bytes_with_nul(), "\"\\xf0\\x9f\\x90\\xa7\"\0".as_bytes());
503 /// assert_eq!(s.as_bytes_with_nul(), "\"so \\\"cool\\\"\"\0".as_bytes());
512 0x20..=0x7e => f.write_char(c as char)?, in fmt()
545 unsafe { Self::from_bytes_with_nul_unchecked(&self.0[index.start..]) } in index()
597 const S: &str = concat!($str, "\0");
622 \\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\
632 let good_bytes = b"\xf0\x9f\xa6\x80\0"; in test_cstr_to_str()
641 let bad_bytes = b"\xc3\x28\0"; in test_cstr_to_str_invalid_utf8()
649 let good_bytes = b"\xf0\x9f\x90\xA7\0"; in test_cstr_as_str_unchecked()
659 let hello_world = CStr::from_bytes_with_nul(b"hello, world!\0")?; in test_cstr_display()
661 let non_printables = CStr::from_bytes_with_nul(b"\x01\x09\x0a\0")?; in test_cstr_display()
663 let non_ascii = CStr::from_bytes_with_nul(b"d\xe9j\xe0 vu\0")?; in test_cstr_display()
665 let good_bytes = CStr::from_bytes_with_nul(b"\xf0\x9f\xa6\x80\0")?; in test_cstr_display()
666 assert_eq!(format!("{good_bytes}"), "\\xf0\\x9f\\xa6\\x80"); in test_cstr_display()
672 let mut bytes: [u8; 256] = [0; 256]; in test_cstr_display_all_bytes()
673 // fill `bytes` with [1..=255] + [0] in test_cstr_display_all_bytes()
684 let hello_world = CStr::from_bytes_with_nul(b"hello, world!\0")?; in test_cstr_debug()
686 let non_printables = CStr::from_bytes_with_nul(b"\x01\x09\x0a\0")?; in test_cstr_debug()
688 let non_ascii = CStr::from_bytes_with_nul(b"d\xe9j\xe0 vu\0")?; in test_cstr_debug()
690 let good_bytes = CStr::from_bytes_with_nul(b"\xf0\x9f\xa6\x80\0")?; in test_cstr_debug()
691 assert_eq!(format!("{good_bytes:?}"), "\"\\xf0\\x9f\\xa6\\x80\""); in test_cstr_debug()
705 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_display()
706 assert_eq!(format!("{good_bytes}"), "\\xf0\\x9f\\xa6\\x80"); in test_bstr_display()
720 let good_bytes = BStr::from_bytes(b"\xf0\x9f\xa6\x80"); in test_bstr_debug()
721 assert_eq!(format!("{good_bytes:?}"), "\"\\xf0\\x9f\\xa6\\x80\""); in test_bstr_debug()
747 beg: 0, in new()
748 pos: 0, in new()
749 end: 0, in new()
801 // don't want it to wrap around to 0. in write_str()
804 // Amount that we can copy. `saturating_sub` ensures we get 0 if `pos` goes past `end`. in write_str()
807 if len_to_copy > 0 { in write_str()
846 &self.0 in deref()
852 self.0.write_str(s)?; in write_str()
855 if self.0.pos > self.0.end { in write_str()
877 /// assert_eq!(s.to_bytes_with_nul(), "abc1020\0".as_bytes());
881 /// assert_eq!(s.to_bytes_with_nul(), "testing123\0".as_bytes());
884 /// let s = CString::try_from_fmt(fmt!("a\0b{}", 123));
898 f.write_str("\0")?; in try_from_fmt()
906 f.write_str("\0")?; in try_from_fmt()
916 let ptr = unsafe { bindings::memchr(buf.as_ptr().cast(), 0, f.bytes_written() - 1) }; in try_from_fmt()