string searching question

var a1 : String = "imissmommy" 
function a11() { 
    if (str.search(a1,"mommy")) 
        print("momy is okay baby");
} 

i want to search a string but i don't know how can i, str.search()? string.search()? what is the function? ty.

1 Answer

1
if (a1.Contains("mommy"))
{
   // ...
}

More information about String.Contains at MSDN.

Also, all String members.