[ create a new paste ] login | about

Link: http://codepad.org/uOOuuNQ6    [ raw code | output | fork ]

nepta - Lua, pasted on Apr 7:
1
2
3
4
5
6
7
8
9
function isBlank(s)
	return s ~= nil and s:match("%S") ~= nil
end


print(isBlank "miaou")
print(isBlank "     ")
print(isBlank "")
print(isBlank(nil))


Output:
1
2
3
4
true
false
false
false


Create a new paste based on this one


Comments: