diff options
Diffstat (limited to 'lib/mbstring/u8spn.c')
-rw-r--r-- | lib/mbstring/u8spn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mbstring/u8spn.c b/lib/mbstring/u8spn.c index 1cf45f2..d41fcbc 100644 --- a/lib/mbstring/u8spn.c +++ b/lib/mbstring/u8spn.c @@ -1,15 +1,15 @@ #include "mbstring.h" size_t -u8spn(const char8_t *s, size_t n, const rune *p, size_t m) +u8spn(struct u8view sv, const rune *p, size_t n) { rune ch; - size_t k = 0, l; + size_t k = 0, w; - while ((l = u8next(&ch, &s, &n))) { - for (size_t i = 0; i < m; i++) { + while (w = u8next(&ch, &sv)) { + for (size_t i = 0; i < n; i++) { if (p[i] == ch) { - k += l; + k += w; goto found; } } |