authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-11-14 17:58:58-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-11-14 17:58:58-05:00
log7a74dbadd79d2b26a449027dd83753ae4d2a8032
treebcfa7f9a4cda1b5414255d42c376734664ee4e55
parent5029322aa127cd20a08740a2215fad5863c574fa

add docs for std.base64


1 files changed, 2 insertions(+), 0 deletions(-)

std/base64.zig+2
......@@ -7,6 +7,7 @@ pub fn encode(dest: []u8, source: []const u8) -> []u8 {
77 return encodeWithAlphabet(dest, source, standard_alphabet);
88}
99
10/// invalid characters in source are allowed, but they cause the value of dest to be undefined.
1011pub fn decode(dest: []u8, source: []const u8) -> []u8 {
1112 return decodeWithAlphabet(dest, source, standard_alphabet);
1213}
......@@ -59,6 +60,7 @@ pub fn encodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8)
5960 return dest[0..out_index];
6061}
6162
63/// invalid characters in source are allowed, but they cause the value of dest to be undefined.
6264pub fn decodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8) -> []u8 {
6365 assert(alphabet.len == 65);
6466