Files
calc/help/strpos
2017-05-21 15:38:36 -07:00

41 lines
662 B
Plaintext

NAME
strpos - print the first occurrence of a string in another string
SYNOPSIS
strpos(s, t)
TYPES
s str
t str
return int
DESCRIPTION
This function returns the location of the first occurance of the string t
in the string s. If t is not found within s, 0 is returned. If t is
found at the beginning of s, 1 is returned.
EXAMPLE
> strpos("abcdefg", "c")
3
> strpos("abcdefg", "def")
4
> strpos("abcdefg", "defg")
4
> strpos("abcdefg", "defgh")
0
> strpos("abcdefg", "abc")
1
> strpos("abcdefg", "xyz")
0
LIMITS
none
LIBRARY
none
SEE ALSO
XXX - fill in