charTo6Bit
Function parameters
Parameters
- c:u8
Type definitions in this namespace
Types
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
fn charTo6Bit(c: u8) u8 {
return switch (c) {
'a'...'z' => c - 'a',
'A'...'Z' => c - 'A' + 26,
'0'...'9' => c - '0' + 52,
'.' => 62,
'_' => 63,
else => @panic("Failed to encode byte as 6-bit char"),
};
}