aboutsummaryrefslogtreecommitdiff
path: root/src/common/string.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-09 19:41:18 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-09 19:41:18 +0100
commitf90436dd7415354105a27846e587adefaea7ef63 (patch)
treeed8390925b4d6b3a0c71b189d04e79d4333aa3aa /src/common/string.c
parent440d9dc470703d20a55365b3a560196e71d450d4 (diff)
downloadkogata-f90436dd7415354105a27846e587adefaea7ef63.tar.gz
kogata-f90436dd7415354105a27846e587adefaea7ef63.zip
Make way for nullfs
Diffstat (limited to 'src/common/string.c')
-rw-r--r--src/common/string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/string.c b/src/common/string.c
index 027bf03..dc25aee 100644
--- a/src/common/string.c
+++ b/src/common/string.c
@@ -16,6 +16,14 @@ char *strchr(const char *str, char c) {
return NULL;
}
+char *strrchr(const char *str, char c) {
+ char* ret = NULL;
+ do {
+ if (*str == c) ret = (char*)str;
+ } while (*(str++));
+ return ret;
+}
+
char *strcpy(char *dest, const char *src) {
memcpy(dest, src, strlen(src) + 1);
return (char*)src;