From 11a46906d0adb2405167330930b1af139991ec3e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 15 Mar 2001 19:30:26 +0000 Subject: Add index and rindex --- libc/string/string.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libc/string/string.c') diff --git a/libc/string/string.c b/libc/string/string.c index 29ac83a24..2a689ccef 100644 --- a/libc/string/string.c +++ b/libc/string/string.c @@ -151,6 +151,13 @@ char *strchr(const char *str, int c) } #endif +#ifdef L_index +char *index (const char *s, int c) +{ + return( strchr(s, c)); +} +#endif + /********************** Function strrchr ************************************/ #ifdef L_strrchr @@ -172,6 +179,13 @@ char *strrchr(const char *str, int c) } #endif +#ifdef L_rindex +char *rindex (const char *s, int c) +{ + return( strrchr(s, c)); +} +#endif + /********************** Function strdup ************************************/ #ifdef L_strdup -- cgit v1.2.3