Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
# assert not "0xGE".is_int
# assert not "".is_int
# assert not "Not an Int".is_int
# assert not "0xGE".is_int
# assert not "".is_int
# assert not "Not an Int".is_int
+ # assert not "-".is_int
fun is_int: Bool do
if bytelen == 0 then return false
var s = remove_all('_')
var pos = 0
fun is_int: Bool do
if bytelen == 0 then return false
var s = remove_all('_')
var pos = 0
+ var len = s.length
+ while pos < len and s[pos] == '-' do
pos += 1
end
s = s.substring_from(pos)
pos += 1
end
s = s.substring_from(pos)