matchstring

So… this seems odd...

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

Shouldn't the output be 1?

chozo

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

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