function stripos (palheiro, agulha)
palheiro = string.lower(palheiro)
agulha = string.lower(agulha)
if palheiro ~= nil and agulha ~= nil then
return (string.find(palheiro, agulha) -1)
else
return nil
end
end
print(stripos("I love php, I love php too!", "PHP"))
ZnVuY3Rpb24gc3RyaXBvcyAocGFsaGVpcm8sIGFndWxoYSkKCXBhbGhlaXJvID0gc3RyaW5nLmxvd2VyKHBhbGhlaXJvKQoJYWd1bGhhID0gc3RyaW5nLmxvd2VyKGFndWxoYSkKCQogICAgaWYgcGFsaGVpcm8gfj0gbmlsIGFuZCBhZ3VsaGEgfj0gbmlsIHRoZW4gICAKICAgICAgICByZXR1cm4gKHN0cmluZy5maW5kKHBhbGhlaXJvLCBhZ3VsaGEpIC0xKSAgIAogICAgZWxzZSAgCiAgICAgICAgcmV0dXJuIG5pbCAgIAogICAgZW5kICAgCmVuZCAgCgpwcmludChzdHJpcG9zKCJJIGxvdmUgcGhwLCBJIGxvdmUgcGhwIHRvbyEiLCAiUEhQIikp