matchstring

So… this seems odd...

•string s1="How did it go"
•print stringmatch(s1, "How")
  0

Shouldn't the output be 1?

No, since "How" is not the same as "How did it go". Use:

•string s1="How did it go"
•print stringmatch(s1, "How*")
  1

 

Hi,

Not complete Doh! cmpstr(str1,str2) returns 0 when strings are equal.

Andy