mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Merge pull request #115 from YunoHost/fix_string_helper
Fix string helper if string is empty
This commit is contained in:
commit
5bd4de4bfa
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,10 @@ end
|
|||
|
||||
-- Test whether a string starts with another
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue