RosettaCodeData/Task/Empty-string/MiniScript/empty-string.mini

14 lines
258 B
Plaintext

string.isEmpty = function
return self == ""
end function
number.toBoolStr = function
if self == 0 then return "false"
return "true"
end function
s = ""
t = "0"
print "'s' is empty? " + s.isEmpty.toBoolStr
print "'t' is empty? " + t.isEmpty.toBoolStr