Quote:
|
Originally Posted by Omini
How do I do
NPC Code:
if (strcontains(,)) { }
in GS2? I checked the basic scripting page and it's not there...
Can anyone help me out?
|
PHP Code:
function contains( strStack, strNeedle )
{ // Usage: container( this.var, "foo" );
for ( i = 0; i < strStack.length() - strNeedle.length(); i ++ )
if ( strStack.substring( i, strNeedle.length()) == strNeedle)
return true;
return false;
}