projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merged PDPCLIB and Therx code.
[fw/pdclib]
/
functions
/
string
/
strrchr.c
diff --git
a/functions/string/strrchr.c
b/functions/string/strrchr.c
index 4249de3b17489863468b9735ac679978d97459e4..77504433f9182a0066e821e65dd139e7c24df052 100644
(file)
--- a/
functions/string/strrchr.c
+++ b/
functions/string/strrchr.c
@@
-15,3
+15,17
@@
char * strrchr( char * s, int c ) { /* TODO */ };
// Standard C
char * strrchr( const char * s, int c ) { /* TODO */ };
+
+/* PDPC code - unreviewed
+{
+ const char *p;
+
+ p = s + strlen(s);
+ while (p >= s)
+ {
+ if (*p == (char)c) return ((char *)p);
+ p--;
+ }
+ return (NULL);
+}
+*/