Given a character (u8) in zig, how can I make sure it is in ASCII uppercase?
Does the standard library provide helper functions for this?
Given a character (u8) in zig, how can I make sure it is in ASCII uppercase?
Does the standard library provide helper functions for this?
Copyright © 2021 Jogjafile Inc.
Use
std.ascii.toUpper(c)In general, the standard library provides the following functions:
std.ascii.isUpperstd.ascii.toUpperstd.ascii.upperStringAnd the corresponding functions for lowercase letters:
std.ascii.isLowerstd.ascii.toLowerstd.ascii.lowerStringHere is some example usage: