Lines Matching full:let

101         let len = unsafe { bindings::strlen(ptr) } + 1;  in from_char_ptr()
103 let bytes = unsafe { core::slice::from_raw_parts(ptr as _, len as _) }; in from_char_ptr()
120 let mut i = 0; in from_bytes_with_nul()
174 /// let cstr = CStr::from_bytes_with_nul(b"foo\0").unwrap();
196 /// let bar = c_str!("ツ");
219 /// let penguin = c_str!("��");
220 /// let s = CString::try_from_fmt(fmt!("{}", penguin)).unwrap();
223 /// let ascii = c_str!("so \"cool\"");
224 /// let s = CString::try_from_fmt(fmt!("{}", ascii)).unwrap();
248 /// let penguin = c_str!("��");
249 /// let s = CString::try_from_fmt(fmt!("{:?}", penguin)).unwrap();
253 /// let ascii = c_str!("so \"cool\"");
254 /// let s = CString::try_from_fmt(fmt!("{:?}", ascii)).unwrap();
294 let _ = &self.as_bytes()[index.start..]; in index()
363 let good_bytes = b"\xf0\x9f\xa6\x80\0"; in test_cstr_to_str()
364 let checked_cstr = CStr::from_bytes_with_nul(good_bytes).unwrap(); in test_cstr_to_str()
365 let checked_str = checked_cstr.to_str().unwrap(); in test_cstr_to_str()
372 let bad_bytes = b"\xc3\x28\0"; in test_cstr_to_str_panic()
373 let checked_cstr = CStr::from_bytes_with_nul(bad_bytes).unwrap(); in test_cstr_to_str_panic()
379 let good_bytes = b"\xf0\x9f\x90\xA7\0"; in test_cstr_as_str_unchecked()
380 let checked_cstr = CStr::from_bytes_with_nul(good_bytes).unwrap(); in test_cstr_as_str_unchecked()
381 let unchecked_str = unsafe { checked_cstr.as_str_unchecked() }; in test_cstr_as_str_unchecked()
435 let pos = buf as usize; in from_buffer()
462 let pos_new = self.pos.saturating_add(s.len()); in write_str()
465 let len_to_copy = core::cmp::min(pos_new, self.end).saturating_sub(self.pos); in write_str()
536 /// let s = CString::try_from_fmt(fmt!("{}{}{}", "abc", 10, 20)).unwrap();
539 /// let tmp = "testing";
540 /// let s = CString::try_from_fmt(fmt!("{tmp}{}", 123)).unwrap();
544 /// let s = CString::try_from_fmt(fmt!("a\0b{}", 123));
555 let mut f = RawFormatter::new(); in try_from_fmt()
558 let size = f.bytes_written(); in try_from_fmt()
561 let mut buf = Vec::try_with_capacity(size)?; in try_from_fmt()
563 let mut f = unsafe { Formatter::from_buffer(buf.as_mut_ptr(), size) }; in try_from_fmt()
575 let ptr = unsafe { bindings::memchr(buf.as_ptr().cast(), 0, (f.bytes_written() - 1) as _) }; in try_from_fmt()
600 let mut buf = Vec::new(); in try_from()