forked from len0rd/rockbox
Use the strrsplt function in one more place
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15662 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
940fe31f81
commit
4acae4da03
4 changed files with 19 additions and 20 deletions
16
apps/misc.c
16
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue