We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NUL
1 parent ed85965 commit 8cfce47Copy full SHA for 8cfce47
rust/kernel/str.rs
@@ -149,13 +149,13 @@ impl CStr {
149
self.0.as_ptr() as _
150
}
151
152
- /// Convert the string to a byte slice without the trailing 0 byte.
+ /// Convert the string to a byte slice without the trailing `NUL` byte.
153
#[inline]
154
pub fn as_bytes(&self) -> &[u8] {
155
&self.0[..self.len()]
156
157
158
- /// Convert the string to a byte slice containing the trailing 0 byte.
+ /// Convert the string to a byte slice containing the trailing `NUL` byte.
159
160
pub const fn as_bytes_with_nul(&self) -> &[u8] {
161
&self.0
0 commit comments