28063c02f4
It returns the size of the rune array, so size_t is the right type to use here.
14 lines
224 B
C
14 lines
224 B
C
/* See LICENSE file for copyright and license details. */
|
|
#include "../utf.h"
|
|
|
|
size_t
|
|
utftorunestr(const char *str, Rune *r)
|
|
{
|
|
size_t i, n;
|
|
|
|
for (i = 0; (n = chartorune(&r[i], str)) && r[i]; i++)
|
|
str += n;
|
|
|
|
return i;
|
|
}
|