Skip to content

Commit 7a74dba

Browse files
committedNov 14, 2017
add docs for std.base64
1 parent 5029322 commit 7a74dba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎std/base64.zig

+2
Original file line numberDiff line numberDiff line change
@@ -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.
1011
pub 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.
6264
pub fn decodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8) -> []u8 {
6365
assert(alphabet.len == 65);
6466

0 commit comments

Comments
 (0)
Please sign in to comment.