add Find_last_separator_unicode() function

This commit is contained in:
Thomas Bernard
2018-12-18 17:50:57 +01:00
parent c99fa40e6a
commit 322d95add8
2 changed files with 20 additions and 1 deletions

View File

@@ -258,7 +258,7 @@ char * Find_last_separator(const char * str)
const char * position = NULL;
for (; *str != '\0'; str++)
if (*str == PATH_SEPARATOR[0]
#ifdef __WIN32__
#if defined(__WIN32__) || defined(WIN32)
|| *str == '/'
#elif __AROS__
|| *str == ':'
@@ -267,6 +267,22 @@ char * Find_last_separator(const char * str)
position = str;
return (char *)position;
}
word * Find_last_separator_unicode(const word * str)
{
const word * position = NULL;
for (; *str != 0; str++)
if (*str == (byte)PATH_SEPARATOR[0]
#if defined(__WIN32__) || defined(WIN32)
|| *str == '/'
#elif __AROS__
|| *str == ':'
#endif
)
position = str;
return (word *)position;
}
// Récupère la partie "nom de file seul" d'un chemin
void Extract_filename(char *dest, const char *source)
{