core :: Char :: is_whitespace
These correspond to the "Other" and "Separator" groups of the Unicode.
In the ASCII encoding, this is those <= to space (0x20) plus delete (0x7F).
assert 'A'.is_whitespace == false
assert ','.is_whitespace == false
assert ' '.is_whitespace == true # space
assert ' '.is_whitespace == true # non-breaking space
assert '\t'.is_whitespace == true
# Is self a whitespace character?
#
# These correspond to the "Other" and "Separator" groups of the Unicode.
#
# In the ASCII encoding, this is those <= to space (0x20) plus delete (0x7F).
#
# assert 'A'.is_whitespace == false
# assert ','.is_whitespace == false
# assert ' '.is_whitespace == true # space
# assert ' '.is_whitespace == true # non-breaking space
# assert '\t'.is_whitespace == true
fun is_whitespace: Bool
do
var i = code_point
return i <= 0x20 or i == 0x7F or i == 0xA0
end
lib/core/kernel.nit:1051,2--1066,4