Lines Matching full:nul
134 /// Supplied bytes contain an interior `NUL`.
137 /// Supplied bytes are not terminated by `NUL`.
148 /// A string that is guaranteed to have exactly one `NUL` byte, which is at the
156 /// Returns the length of this string excluding `NUL`.
162 /// Returns the length of this string with `NUL`.
174 /// Returns `true` if the string only includes `NUL`.
184 /// `ptr` must be a valid pointer to a `NUL`-terminated C string, and it must
190 // to a `NUL`-terminated C string. in from_char_ptr()
194 // SAFETY: As `len` is returned by `strlen`, `bytes` does not contain interior `NUL`. in from_char_ptr()
195 // As we have added 1 to `len`, the last byte is known to be `NUL`. in from_char_ptr()
201 /// The provided slice must be `NUL`-terminated, does not contain any
202 /// interior `NUL` bytes.
228 /// `bytes` *must* end with a `NUL` byte, and should only have a single
229 /// `NUL` byte (or the string will be truncated).
241 /// `bytes` *must* end with a `NUL` byte, and should only have a single
242 /// `NUL` byte (or the string will be truncated).
255 /// Convert the string to a byte slice without the trailing `NUL` byte.
261 /// Convert the string to a byte slice containing the trailing `NUL` byte.
323 // INVARIANT: This doesn't introduce or remove NUL bytes in the C in make_ascii_lowercase()
338 // INVARIANT: This doesn't introduce or remove NUL bytes in the C in make_ascii_uppercase()
503 /// The string literal should not contain any `NUL` bytes.
518 Err(_) => panic!("string contains interior NUL"),
768 /// An owned string that is guaranteed to have exactly one `NUL` byte, which is at the end.
774 /// The string is always `NUL`-terminated and contains no other `NUL` bytes.
788 /// // This fails because it has an embedded `NUL` byte.
799 // Calculate the size needed (formatted string plus `NUL` terminator). in try_from_fmt()
816 // Check that there are no `NUL` bytes before the end. in try_from_fmt()
818 // (which the minimum buffer size) and is non-zero (we wrote at least the `NUL` terminator) in try_from_fmt()
825 // INVARIANT: We wrote the `NUL` terminator and checked above that no other `NUL` bytes in try_from_fmt()
835 // SAFETY: The type invariants guarantee that the string is `NUL`-terminated and that no in deref()
836 // other `NUL` bytes exist. in deref()
843 // SAFETY: A `CString` is always NUL-terminated and contains no other in deref_mut()
844 // NUL bytes. in deref_mut()