How come the `CStr`/`CString` docs use the "nul bytes" spelling instead of "null bytes"?

I was looking at the CStr docs, and was wondering if there was a reason it uses the spelling of "nul bytes" instead of the more common "null bytes"? This even extends to some of the function names, like from_vec_with_nul, but is not completely consistent (e.g. the docs for impl From<Vec<NonZeroU8, Global>> for CString use the "null bytes" spelling).

I also cross-checked a few dictionaries as well as docs for other programming languages, but couldn't find a lot of other usages of the "nul" spelling. Idk if I'm just being way too pedantic, but I was just wondering whether the spelling is intentional, or what the reasons behind it might be.

Related internals thread here

Short answer: "NUL" is the abbreviation of the ASCII character with a value of zero which is also called NULL.

4 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.