simdutf
8.0.0
Unicode at GB/s.
Loading...
Searching...
No Matches
latin1_to_utf32.h
1
#ifndef SIMDUTF_LATIN1_TO_UTF32_H
2
#define SIMDUTF_LATIN1_TO_UTF32_H
3
4
namespace
simdutf {
5
namespace
scalar {
6
namespace
{
7
namespace
latin1_to_utf32 {
8
9
template
<
typename
InputPtr>
10
#if SIMDUTF_CPLUSPLUS20
11
requires
simdutf::detail::indexes_into_byte_like<InputPtr>
12
#endif
13
simdutf_constexpr23
size_t
convert(InputPtr data,
size_t
len,
14
char32_t
*utf32_output) {
15
char32_t
*start{utf32_output};
16
for
(
size_t
i = 0; i < len; i++) {
17
*utf32_output++ = uint8_t(data[i]);
18
}
19
return
utf32_output - start;
20
}
21
22
}
// namespace latin1_to_utf32
23
}
// unnamed namespace
24
}
// namespace scalar
25
}
// namespace simdutf
26
27
#endif
include
simdutf
scalar
latin1_to_utf32
latin1_to_utf32.h
Generated by
1.9.8