Merge branch 'method-test-blank-strings' of git://github.com/joenio/telegram-bot into joenio-method-test-blank-strings
Conflicts: bot/utils.lua
This commit is contained in:
commit
72a94106f0
@ -194,6 +194,12 @@ 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
|
||||||
|
|
||||||
-- Returns true if String starts with Start
|
-- Returns true if String starts with Start
|
||||||
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