mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Fix string helper if string is empty
This commit is contained in:
parent
e7a131063e
commit
441f323094
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,10 @@ end
|
||||||
|
|
||||||
-- Test whether a string starts with another
|
-- Test whether a string starts with another
|
||||||
function string.starts(String, Start)
|
function string.starts(String, Start)
|
||||||
return string.sub(String, 1, string.len(Start)) == Start
|
if not String then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return string.sub(String, 1, string.len(Start)) == Start
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue