This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function characterPresent(stringParam, character) | |
--[[ | |
This function returns true if and only if character is in stringParam. | |
]]-- | |
--Loop through stringParam: | |
for i=1, #stringParam do | |
--If the current character is character, return true. | |
if stringParam:sub(i, i) == character then return true end | |
end | |
--If we go through the whole string without returning true, we get to this point. |