mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
41 lines
662 B
Plaintext
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
|