mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: ~500 more byte=>u8
This commit is contained in:
@@ -4,20 +4,20 @@
|
||||
module util
|
||||
|
||||
[inline]
|
||||
pub fn is_key_char(c byte) bool {
|
||||
pub fn is_key_char(c u8) bool {
|
||||
return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) // || c == `_` || c == `-` <- these are identified when tokenizing
|
||||
}
|
||||
|
||||
// is_ascii_control_character returns true if `byte_char` is an ASCII control character.
|
||||
[inline]
|
||||
pub fn is_ascii_control_character(byte_char byte) bool {
|
||||
pub fn is_ascii_control_character(byte_char u8) bool {
|
||||
return (byte_char >= 0 && byte_char <= 0x1f) || byte_char == 0x7f
|
||||
}
|
||||
|
||||
// is_illegal_ascii_control_character returns true if a `byte_char` ASCII control character
|
||||
// is considered "illegal" in TOML .
|
||||
[inline]
|
||||
pub fn is_illegal_ascii_control_character(byte_char byte) bool {
|
||||
pub fn is_illegal_ascii_control_character(byte_char u8) bool {
|
||||
return byte_char != 0x09 && is_ascii_control_character(byte_char)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user