Author Topic: Sensing if a string starts with a character.  (Read 403 times)

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?

if(strpos(%text, "a") == 0)

strpos("haystack", "needle") - returns the position of needle in haystack.
stripos for case insensitivity.