Blockland Forums > Modification Help
Sensing if a string starts with a character.
Pages: (1/1)
otto-san:
I'm making something and need to know how to sense if something begins with a character rather than IS a character.
I know it's something like:
if (%text $= *) (Not the symbol I'm using, but I bet there's something wrong with it anyways.)
The bug report said:
^if (%text $= @##)##
which i don't get. Can anyone help?
Kalphiter:
if(strpos(%text, "a") == 0)
strpos("haystack", "needle") - returns the position of needle in haystack.
stripos for case insensitivity.
otto-san:
Thanks. :D
Pages: (1/1)