aboutsummaryrefslogtreecommitdiff
path: root/src/common/string.c
diff options
context:
space:
mode:
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;