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 * <<strrchr>>---reverse search for character in string
21 * char * strrchr(const char *<[string]>, int <[c]>);
24 * char * strrchr(<[string]>, <[c]>);
27 * This function finds the last occurence of <[c]> (converted to
28 * a char) in the string pointed to by <[string]> (including the
29 * terminating null character).
31 * Returns a pointer to the located character, or a null pointer
32 * if <[c]> does not occur in <[string]>.
34 * <<strrchr>> is ANSI C.
35 * <<strrchr>> requires no supporting OS subroutines.
47 Find last occurrence of character in string.
48 Returns the last occurrence of c in string.
49 The null-terminating character is included as part of the string and can also be searched.
50 @return If character is found, a pointer to the last occurrence of c in string is returned.
51 If not, NULL is returned.
52 @param s Null-terminated string scanned in the search.
53 @param i Character to be found.
56 strrchr (const char *s, int i)
58 const char *last = NULL;
74 rindex (const char *s, int c)
76 return strrchr (s, c);