mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
scanner.v: refactoring
This commit is contained in:

committed by
Alexander Medvednikov

parent
8462e99bc5
commit
88758082d2
@ -714,6 +714,14 @@ pub fn (c byte) is_digit() bool {
|
||||
return c >= `0` && c <= `9`
|
||||
}
|
||||
|
||||
pub fn (c byte) is_hex_digit() bool {
|
||||
return c.is_digit() || (c >= `a` && c <= `f`) || (c >= `A` && c <= `F`)
|
||||
}
|
||||
|
||||
pub fn (c byte) is_oct_digit() bool {
|
||||
return c >= `0` && c <= `7`
|
||||
}
|
||||
|
||||
pub fn (c byte) is_letter() bool {
|
||||
return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`)
|
||||
}
|
||||
|
Reference in New Issue
Block a user