encode_buf

Function encode_buf 

Source
pub fn encode_buf<T: Into<u128>>(num: T, buf: &mut String)
Expand description

Encodes an unsigned integer into base62, using the standard digit ordering (0 to 9, then A to Z, then a to z), and then appends it onto the end of the given String.

ยงExample

extern crate base62;

let mut buf = String::from("1337 in base62: ");
base62::encode_buf(1337_u32, &mut buf);
assert_eq!(buf, "1337 in base62: LZ");