On Sun, 3 Apr 2022, Allin Cottrell wrote:
There isn't a built-in function that gives you exactly the match
position of
one string in another, but the strstr() function can be used for that
purpose, as in
<hansl>
string s = "What's in a name?"
string p = strstr(s, "name")
if s != ""
printf "found at offset %d\n", strlen(s) - strlen(p)
endif
</hansl>
I meant,
if p != ""
in the test above.
Allin