From 7a74dbadd79d2b26a449027dd83753ae4d2a8032 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 14 Nov 2017 17:58:58 -0500 Subject: add docs for std.base64 --- std/base64.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'std') 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); -- cgit v1.2.3