2 strpos - print the first occurrence of a string in another string
14 This function returns the location of the first occurance of the string t
15 in the string s. If t is not found within s, 0 is returned. If t is
16 found at the beginning of s, 1 is returned.
19 ; strpos("abcdefg", "c")
21 ; strpos("abcdefg", "def")
23 ; strpos("abcdefg", "defg")
25 ; strpos("abcdefg", "defgh")
27 ; strpos("abcdefg", "abc")
29 ; strpos("abcdefg", "xyz")
39 strcat, strcpy, strerror, strlen, strncmp, strncpy,
40 strprintf, strscan, strscanf, substr
42 ## Copyright (C) 1999-2006 Ernest Bowen
44 ## Calc is open software; you can redistribute it and/or modify it under
45 ## the terms of the version 2.1 of the GNU Lesser General Public License
46 ## as published by the Free Software Foundation.
48 ## Calc is distributed in the hope that it will be useful, but WITHOUT
49 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
50 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
51 ## Public License for more details.
53 ## A copy of version 2.1 of the GNU Lesser General Public License is
54 ## distributed with calc under the filename COPYING-LGPL. You should have
55 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
56 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
58 ## @(#) $Revision: 30.1 $
59 ## @(#) $Id: strpos,v 30.1 2007/03/16 11:10:42 chongo Exp $
60 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strpos,v $
62 ## Under source code control: 1995/07/09 03:48:57
63 ## File existed as early as: 1995
65 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
66 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/