Function digitToChar [src]

Prototype

pub fn digitToChar(digit: u8, case: Case) u8

Parameters

digit: u8case: Case

Source

pub fn digitToChar(digit: u8, case: Case) u8 { return switch (digit) { 0...9 => digit + '0', 10...35 => digit + ((if (case == .upper) @as(u8, 'A') else @as(u8, 'a')) - 10), else => unreachable, }; }