self
a well-formed BigInt (i.e. parsable via to_bi
)assert "123".is_bi
assert "-123".is_bi
assert not "0b1011".is_bi
assert not "123u8".is_bi
assert not "Not a BigInt".is_bi
# Is `self` a well-formed BigInt (i.e. parsable via `to_bi`)
#
# assert "123".is_bi
# assert "-123".is_bi
# assert not "0b1011".is_bi
# assert not "123u8".is_bi
# assert not "Not a BigInt".is_bi
fun is_bi: Bool do
var pre = prefix("-")
if pre != null then
return pre.text_after.is_dec
else
return is_dec
end
end
lib/gmp/gmp.nit:32,5--46,7