diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-11-15 22:32:23 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-11-15 22:32:23 -0500 |
| commit | a984040faecab4fed4fc5e36e44d5ec352b7a098 (patch) | |
| tree | 1f86151c1381dd580d1e3061e32bc9a36515e61f /std | |
| parent | 371e578151b1bc402d766ace161cfb4e06777db6 (diff) | |
| parent | 7a74dbadd79d2b26a449027dd83753ae4d2a8032 (diff) | |
| download | zig-a984040faecab4fed4fc5e36e44d5ec352b7a098.tar.gz zig-a984040faecab4fed4fc5e36e44d5ec352b7a098.zip | |
Merge remote-tracking branch 'origin/master' into llvm6
Diffstat (limited to 'std')
| -rw-r--r-- | std/base64.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/std/base64.zig b/std/base64.zig index 863a0c856a..5a57e7777f 100644 --- 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); |
