commit 9a4da6c8d8d55f47609b8e900e9a4bb1ac34d5e7 (tree)
parent 371e578151b1bc402d766ace161cfb4e06777db6
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Wed, 15 Nov 2017 22:24:42 -0500
Merge branch 'master' into llvm6
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/std/base64.zig b/std/base64.zig
@@ -7,6 +7,7 @@ pub fn encode(dest: []u8, source: []const u8) -> []u8 {
return encodeWithAlphabet(dest, source, standard_alphabet);
}
+/// invalid characters in source are allowed, but they cause the value of dest to be undefined.
pub fn decode(dest: []u8, source: []const u8) -> []u8 {
return decodeWithAlphabet(dest, source, standard_alphabet);
}
@@ -59,6 +60,7 @@ pub fn encodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8)
return dest[0..out_index];
}
+/// invalid characters in source are allowed, but they cause the value of dest to be undefined.
pub fn decodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8) -> []u8 {
assert(alphabet.len == 65);