encode_fmt

Function encode_fmt 

Source
pub fn encode_fmt<T: Into<u128>>(num: T) -> impl Display
Expand description

Writes the base62 representation of a number using the standard alphabet to any fmt::Write destination.

ยงExample

use core::fmt::Write;

let mut output = String::new();
write!(output, "{}", base62::encode_fmt(1337_u32));
assert_eq!(output, "LZ");