Function toUpper [src]
Uppercases the character and returns it as-is if already uppercase or not a letter.
Prototype
pub fn toUpper(c: u8) u8
Parameters
c: u8
Source
pub fn toUpper(c: u8) u8 {
const mask = @as(u8, @intFromBool(isLower(c))) << 5;
return c ^ mask;
}