In this lesson, the
:match() construction is an example of some Lua syntactic sugar (special shortcut syntax) referring to the
standard Lua string.match function.
Let's look at this example:
Code
if spell.name:match('Cure') then
This is a shortcut for calling
string.match() with two parameters:
spell.name, which is indeed a string, and a second string pattern,
'Cure'.
Written out in full Lua syntax, it would look something like this:
Code
if string.match(spell.name, 'Cure') then
You'll see this type of shortcut used all over the place in various Windower Lua things, so it is probably helpful to understand exactly what's happening.