aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/builtin/js/byte.js.v
blob: af1803b29d2a914be50dd87bb173e68f4e5ab561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module builtin

pub fn (b byte) is_space() bool {
	mut result := false
	#result.val = /^\s*$/.test(String.fromCharCode(b))

	return result
}

pub fn (c byte) is_letter() bool {
	result := false

	#result.val = (c.val >= `a`.charCodeAt() && c.val <= `z`.charCodeAt()) || (c.val >= `A`.charCodeAt() && c.val <= `Z`.charCodeAt())

	return result
}