sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

utftorunestr.c (217B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include "../utf.h"
      3 
      4 int
      5 utftorunestr(const char *str, Rune *r)
      6 {
      7 	int i, n;
      8 
      9 	for(i = 0; (n = chartorune(&r[i], str)) && r[i]; i++)
     10 		str += n;
     11 
     12 	return i;
     13 }