nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bee27df
)
lib/core: Added `is_whitespace` method to `Byte`
author
Lucas Bajolet
<r4pass@hotmail.com>
Wed, 8 Jun 2016 15:06:40 +0000
(11:06 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Wed, 8 Jun 2016 18:31:45 +0000
(14:31 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/core/kernel.nit
patch
|
blob
|
history
diff --git
a/lib/core/kernel.nit
b/lib/core/kernel.nit
index
399487a
..
fe45072
100644
(file)
--- a/
lib/core/kernel.nit
+++ b/
lib/core/kernel.nit
@@
-699,6
+699,9
@@
universal Byte
return self
end
end
+
+ # Is `self` an ASCII whitespace ?
+ fun is_whitespace: Bool do return self == 0x7Fu8 or self <= 0x20u8
end
# Native integer numbers.