diff options
Diffstat (limited to 'apps/misc.c')
| -rw-r--r-- | apps/misc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c index d81794d..4af97af 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -1076,3 +1076,19 @@ int hex_to_rgb(const char* hex) } #endif /* HAVE_LCD_COLOR */ +char* strrsplt(char* str, int c) +{ + char* s = strrchr(str, c); + + if (s != NULL) + { + *s++ = '\0'; + } + else + { + s = str; + } + + return s; +} + |