Modul:Detect singular: Unterschied zwischen den Versionen
handle empty input
(wrong name) |
(handle empty input) |
||
Zeile 16: | Zeile 16: | ||
local checkBullets = yesNo(args.bullets,true) | local checkBullets = yesNo(args.bullets,true) | ||
local s = args[1] -- the input string | local s = args[1] -- the input string | ||
if not s then | |||
return nil -- empty input returns nil | |||
end | |||
s = tostring(s) | |||
if plainFind(s,'forcedetectsingular') then -- magic data string to return true | if plainFind(s,'forcedetectsingular') then -- magic data string to return true | ||
return true | return true |