Searched refs:bytes (Results 1 – 4 of 4) sorted by relevance
40 let bytes = s.as_bytes(); in write_str()41 let len = bytes.len(); in write_str()49 self.buffer[self.pos..self.pos + len].copy_from_slice(bytes); in write_str()
30 pub const fn from_bytes(bytes: &[u8]) -> &Self { in from_bytes()32 unsafe { &*(core::ptr::from_ref(bytes) as *const BStr) } in from_bytes()252 unsafe { Self::from_bytes_with_nul_unchecked(bytes) } in from_char_ptr()260 if bytes.is_empty() { in from_bytes_with_nul()263 if bytes[bytes.len() - 1] != 0 { in from_bytes_with_nul()269 while i + 1 < bytes.len() { in from_bytes_with_nul()270 if bytes[i] == 0 { in from_bytes_with_nul()289 unsafe { core::mem::transmute(bytes) } in from_bytes_with_nul_unchecked()672 let mut bytes: [u8; 256] = [0; 256]; in test_cstr_display_all_bytes() variables675 bytes[i as usize] = i.wrapping_add(1); in test_cstr_display_all_bytes()[all …]
242 const fn push_internal(mut self, bytes: &[u8]) -> Self { in push_internal()246 self.n += bytes.len(); in push_internal()250 while j < bytes.len() { in push_internal()252 self.buf[self.n] = bytes[j]; in push_internal()
19 let mut bytes = [0; _FILE.len() + 1]; variables22 bytes[i] = _FILE[i];25 bytes
Completed in 12 milliseconds