diff options
| author | Nils Wallménius <nils@rockbox.org> | 2007-11-18 14:12:01 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2007-11-18 14:12:01 +0000 |
| commit | 4acae4da032ebd045456d3a625cc96ad4d4745d8 (patch) | |
| tree | 88f634756aa1c40ebcaa4889e8b5bb4637dfc9e9 /apps/misc.c | |
| parent | 940fe31f8102e8723856471896e463d090354aaf (diff) | |
| download | rockbox-4acae4da032ebd045456d3a625cc96ad4d4745d8.zip rockbox-4acae4da032ebd045456d3a625cc96ad4d4745d8.tar.gz rockbox-4acae4da032ebd045456d3a625cc96ad4d4745d8.tar.bz2 rockbox-4acae4da032ebd045456d3a625cc96ad4d4745d8.tar.xz | |
Use the strrsplt function in one more place
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15662 a1c6a512-1295-4272-9138-f99709370657
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; +} + |