From 4aee7b2b428e9561018d378b3db69d61cc924cc2 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 24 Sep 2013 13:26:10 +0100 Subject: [PATCH] Do not imply that str is sometimes null-terminated. --- src/libstd/str.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/str.rs b/src/libstd/str.rs index db4fe5fc762ba..c94d8f366a61f 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -78,8 +78,8 @@ assert_eq!(buf, ~"testing 123"); Rust's string type, `str`, is a sequence of unicode codepoints encoded as a stream of UTF-8 bytes. All safely-created strings are guaranteed to be validly -encoded UTF-8 sequences. Additionally, strings are not guaranteed to be -null-terminated (the null byte is a valid unicode codepoint). +encoded UTF-8 sequences. Additionally, strings are not null-terminated +and can contain null codepoints. The actual representation of strings have direct mappings to vectors: