aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common.libbin35275 -> 35663 bytes
-rw-r--r--src/common/include/string.h1
-rw-r--r--src/common/string.c8
3 files changed, 9 insertions, 0 deletions
diff --git a/src/common/common.lib b/src/common/common.lib
index 058abeb..55de3ef 100644
--- a/src/common/common.lib
+++ b/src/common/common.lib
Binary files differ
diff --git a/src/common/include/string.h b/src/common/include/string.h
index a7a5253..9608dd5 100644
--- a/src/common/include/string.h
+++ b/src/common/include/string.h
@@ -10,6 +10,7 @@ void *memmove(void *dest, const void *src, size_t count);
size_t strlen(const char *str);
char *strchr(const char *str, char c);
+char *strrchr(const char *str, char c);
char *strcpy(char *dest, const char *src);
char *strcat(char *dest, const char *src);
int strcmp(const char *s1, const char *s2);
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;