[][src]Function rusty_ulid::crockford::append_crockford_u64_tuple

pub fn append_crockford_u64_tuple(value: (u64, u64), to_append_to: &mut String)

Appends the crockford Base32 representation of the (u64, u64) to to_append_to.

Examples

use rusty_ulid::crockford::*;

let mut a_string = String::new();
append_crockford_u64_tuple((0, 1), &mut a_string);

assert_eq!(a_string, "00000000000000000000000001");
use rusty_ulid::crockford::*;

let mut a_string = String::new();
append_crockford_u64_tuple((0, 0xFF), &mut a_string);

assert_eq!(a_string, "0000000000000000000000007Z");
use rusty_ulid::crockford::*;

let mut a_string = String::new();
append_crockford_u64_tuple((0, 0xFFFF_FFFF_FFFF_FFFF), &mut a_string);

assert_eq!(a_string, "0000000000000FZZZZZZZZZZZZ");
use rusty_ulid::crockford::*;

let mut a_string = String::new();
append_crockford_u64_tuple((0xFFFF_FFFF_FFFF_FFFF, 0xFFFF_FFFF_FFFF_FFFF), &mut a_string);

assert_eq!(a_string, "7ZZZZZZZZZZZZZZZZZZZZZZZZZ");