MCPcopy Create free account
hub / github.com/audacity/audacity / serd_strlen

Function serd_strlen

lib-src/lv2/serd/src/string.c:80–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80size_t
81serd_strlen(const uint8_t* str, size_t* n_bytes, SerdNodeFlags* flags)
82{
83 size_t n_chars = 0;
84 size_t i = 0;
85 SerdNodeFlags f = 0;
86 for (; str[i]; ++i) {
87 if ((str[i] & 0xC0) != 0x80) { // Start of new character
88 ++n_chars;
89 serd_update_flags(str[i], &f);
90 }
91 }
92 if (n_bytes) {
93 *n_bytes = i;
94 }
95 if (flags) {
96 *flags = f;
97 }
98 return n_chars;
99}
100
101static inline double
102read_sign(const char** sptr)

Callers 7

serd_node_from_stringFunction · 0.85
serd_node_new_uriFunction · 0.85
serd_env_expand_nodeFunction · 0.85
mainFunction · 0.85
sord_new_literalFunction · 0.85
sord_node_from_serd_nodeFunction · 0.85

Calls 1

serd_update_flagsFunction · 0.85

Tested by 1

mainFunction · 0.68