eina: Actually implement strnlen for eina_unicode.
SVN revision: 50700
This commit is contained in:
parent
e48c3cdc31
commit
db89ba43d7
|
@ -95,7 +95,8 @@ EAPI size_t
|
||||||
eina_unicode_strnlen(const Eina_Unicode *ustr, int n)
|
eina_unicode_strnlen(const Eina_Unicode *ustr, int n)
|
||||||
{
|
{
|
||||||
const Eina_Unicode *end;
|
const Eina_Unicode *end;
|
||||||
for (end = ustr; *end; end++)
|
const Eina_Unicode *last = ustr + n; /* technically not portable ;-) */
|
||||||
|
for (end = ustr; *end && last < end; end++)
|
||||||
;
|
;
|
||||||
return end - ustr;
|
return end - ustr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue