core :: Text :: is_bin
true
assert "1101100".is_bin == true assert "1101020".is_bin == false
# Returns `true` if the string contains only Binary digits # # ~~~ # assert "1101100".is_bin == true # assert "1101020".is_bin == false # ~~~ fun is_bin: Bool do for i in chars do if i != '0' and i != '1' then return false return true end