Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * <<strstr>>---find string segment
21 * char *strstr(const char *<[s1]>, const char *<[s2]>);
24 * char *strstr(<[s1]>, <[s2]>)
27 * Locates the first occurence in the string pointed to by <[s1]> of
28 * the sequence of characters in the string pointed to by <[s2]>
29 * (excluding the terminating null character).
31 * Returns a pointer to the located string segment, or a null
32 * pointer if the string <[s2]> is not found. If <[s2]> points to
33 * a string with zero length, the <[s1]> is returned.
35 * <<strstr>> is ANSI C.
36 * <<strstr>> requires no supporting OS subroutines.
49 Scans string1 for the first occurrence of string2.
50 The search does not include terminating null-characters.
51 @return A pointer to the first occurrence of lookfor in searchee.
52 If lookfor is not found in searchee the function returns NULL.
53 @param searchee Null-terminated string to search.
54 @param lookfor Null-terminated string containing the substring to search for.
57 strstr (const char *searchee, const char *lookfor)
63 return (char *) searchee;
75 return (char *) searchee;
78 if (lookfor[i] != searchee[i])