Function encode_into_string
Source pub fn encode_into_string(output: &mut String, data: &[u8], alphabet: Alphabet)
Available on crate feature alloc only.
Expand description
Appends the base64-encoded representation of data to a String.
ยงExample
let mut s = String::from("tag: ");
base64::encode_into_string(&mut s, b"hello", base64::Alphabet::Standard);
assert_eq!(s, "tag: aGVsbG8=");