Coverage Report

Created: 2026-02-26 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/include/simdutf/scalar/latin1.h
Line
Count
Source
1
#ifndef SIMDUTF_LATIN1_H
2
#define SIMDUTF_LATIN1_H
3
4
namespace simdutf {
5
namespace scalar {
6
namespace {
7
namespace latin1 {
8
9
simdutf_really_inline size_t utf8_length_from_latin1(const char *buf,
10
0
                                                     size_t len) {
11
0
  const uint8_t *c = reinterpret_cast<const uint8_t *>(buf);
12
0
  size_t answer = 0;
13
0
  for (size_t i = 0; i < len; i++) {
14
0
    if ((c[i] >> 7)) {
15
0
      answer++;
16
0
    }
17
0
  }
18
0
  return answer + len;
19
0
}
20
21
} // namespace latin1
22
} // unnamed namespace
23
} // namespace scalar
24
} // namespace simdutf
25
26
#endif