MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / utflen

Function utflen

extern/re2/util/rune.cc:211–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211int
212utflen(const char *s)
213{
214 int c;
215 long n;
216 Rune rune;
217
218 n = 0;
219 for(;;) {
220 c = *(unsigned char*)s;
221 if(c < Runeself) {
222 if(c == 0)
223 return n;
224 s++;
225 } else
226 s += chartorune(&rune, s);
227 n++;
228 }
229 return 0;
230}
231
232char*
233utfrune(const char *s, Rune c)

Callers 1

RunTestFunction · 0.85

Calls 1

chartoruneFunction · 0.85

Tested by 1

RunTestFunction · 0.68