Blockland Forums > Modification Help
If Containing
Superb:
--- Quote from: Port on December 10, 2011, 08:30:25 AM ---if( strPos( %var, "@Pig ") => 0 )
If you want case-insensitivity, use striPos instead.
Also, if you want to get the text after the occurrence of "@Pig ", use:
if( ( %pos = strPos( %var, "@Pig ") ) => 0 )
%after = getSubStr( %var, %pos + strLen( "@Pig " ), strLen( %var ) )
--- End quote ---
Just because you always try and correct people I had to do it.
It's not => jes, it's >= 0.
So change all of the => to >= lol.
Port:
Oh wow, haha. How did I not see that :cookieMonster:
MegaScientifical:
jes, you added a parentheses to the line. Also, I use strStr. Apparently, strStr and strPos do the same thing, but I've been used to using strStr.
otto-san:
--- Quote from: MegaScientifical on December 10, 2011, 11:48:30 AM ---jes, you added a parentheses to the line. Also, I use strStr. Apparently, strStr and strPos do the same thing, but I've been used to using strStr.
--- End quote ---
stripos has an additional offset parameter that i never seen anyone use
MegaScientifical:
--- Quote from: otto-san on December 10, 2011, 12:36:43 PM ---stripos has an additional offset parameter that i never seen anyone use
--- End quote ---
Which is?