We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc 0.6 (9873f67 2013-06-04 17:55:34 -0700)
E.g. this assertion fails:
fn main() { use std::str; assert_eq!(str::byte_slice_no_callback("a").len(), 1); }
Notably, str::byte_slice and str::to_bytes work as expected.
The text was updated successfully, but these errors were encountered:
I'm actually in the middle of fixing this right now :) Instead, you should use str::as_bytes_slice, which doesn't include the trailing NULL.
str::as_bytes_slice
Sorry, something went wrong.
This is fixed by #7060 (the choices are now "a".as_bytes(), "a".as_bytes_with_null() and (~"a").as_bytes_with_null_consume()).
"a".as_bytes()
"a".as_bytes_with_null()
(~"a").as_bytes_with_null_consume()
No branches or pull requests
rustc 0.6 (9873f67 2013-06-04 17:55:34 -0700)
E.g. this assertion fails:
Notably, str::byte_slice and str::to_bytes work as expected.
The text was updated successfully, but these errors were encountered: