add our own str_has_prefix function which ignores case
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
c945e4b200
commit
b8825ed092
|
@ -608,3 +608,15 @@ _util_local_path_get(const Evas_Object *obj, const char *relpath)
|
|||
else
|
||||
return _cwd_path_get(obj, relpath);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_util_str_has_prefix(const char *str, const char *prefix)
|
||||
{
|
||||
size_t slen, plen;
|
||||
|
||||
slen = strlen(str);
|
||||
plen = eina_strlen_bounded(prefix, slen);
|
||||
if (plen == (size_t)-1) return EINA_FALSE;
|
||||
|
||||
return (strncasecmp(str, prefix, plen) == 0);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ Eina_Bool _util_link_is_email(const char *str);
|
|||
Eina_Bool _util_link_is_protocol(const char *str);
|
||||
Eina_Bool _util_is_file(const char *str);
|
||||
char *_util_local_path_get(const Evas_Object *obj, const char *relpath);
|
||||
Eina_Bool _util_str_has_prefix(const char *str, const char *prefix);
|
||||
|
||||
#if defined(SUPPORT_DBLWIDTH)
|
||||
static inline Eina_Bool
|
||||
|
|
Loading…
Reference in New Issue