new util method to test if string is blank
This commit is contained in:
parent
f595cb1c85
commit
12aa89c0f1
@ -191,6 +191,11 @@ function string:isempty()
|
|||||||
return self == nil or self == ''
|
return self == nil or self == ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Retruns true if the string is blank
|
||||||
|
function string:isblank()
|
||||||
|
self = self:trim()
|
||||||
|
return self:isempty()
|
||||||
|
end
|
||||||
|
|
||||||
function string.starts(String, Start)
|
function string.starts(String, Start)
|
||||||
return Start == string.sub(String,1,string.len(Start))
|
return Start == string.sub(String,1,string.len(Start))
|
||||||
|
Reference in New Issue
Block a user