Lines Matching refs:as_bytes
10 fn as_bytes(&self) -> &[u8]; in as_bytes() method
96 fn as_bytes(&self) -> &[u8] { in as_bytes() method
97 self.to_str().map(|s| s.as_bytes()).expect(INVALID_UTF8) in as_bytes()
117 self.as_bytes().starts_with(s) in starts_with()
121 for b in self.as_bytes() { in contains_byte()
130 for (i, b) in self.as_bytes().iter().enumerate() { in split_at_byte()
133 OsStr::from_bytes(&self.as_bytes()[..i]), in split_at_byte()
134 OsStr::from_bytes(&self.as_bytes()[i + 1..]), in split_at_byte()
140 OsStr::from_bytes(&self.as_bytes()[self.len()..self.len()]), in split_at_byte()
146 for (i, b) in self.as_bytes().iter().enumerate() { in trim_left_matches()
148 return OsStr::from_bytes(&self.as_bytes()[i..]); in trim_left_matches()
154 return OsStr::from_bytes(&self.as_bytes()[self.len()..]); in trim_left_matches()
161 OsStr::from_bytes(&self.as_bytes()[..i]), in split_at()
162 OsStr::from_bytes(&self.as_bytes()[i..]), in split_at()
169 val: self.as_bytes(), in split()