File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
lib/inc/sys_string/impl/unicode Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ namespace sysstr::util
52
52
m_mapped(mapped)
53
53
{}
54
54
template <utf_encoding Enc, class OutIt >
55
- auto write (char32_t c, OutIt dest) const noexcept (noexcept (*dest++ = utf_char_of<Enc>())) -> OutIt
55
+ static auto write (char32_t c, OutIt dest) noexcept (noexcept (*dest++ = utf_char_of<Enc>())) -> OutIt
56
56
{
57
57
if constexpr (Enc == utf32)
58
58
{
@@ -67,7 +67,7 @@ namespace sysstr::util
67
67
}
68
68
}
69
69
template <utf_encoding Enc, class OutIt >
70
- auto write (const char16_t * begin, const char16_t * end, OutIt dest) const noexcept (noexcept (*dest++ = utf_char_of<Enc>())) -> OutIt
70
+ static auto write (const char16_t * begin, const char16_t * end, OutIt dest) noexcept (noexcept (*dest++ = utf_char_of<Enc>())) -> OutIt
71
71
{
72
72
if constexpr (Enc == utf16)
73
73
{
@@ -80,7 +80,7 @@ namespace sysstr::util
80
80
{
81
81
decoder.put (*begin++);
82
82
if (!decoder.done ())
83
- decoder.put (m_mapped[ *begin++] ); // no need to bounds check, we know end is good
83
+ decoder.put (*begin++); // no need to bounds check, we know end is good
84
84
dest = write<Enc>(decoder.value (), dest);
85
85
}
86
86
return dest;
Original file line number Diff line number Diff line change @@ -233,6 +233,8 @@ TEST_CASE( "Case conversion", "[general]" ) {
233
233
CHECK (S (" ΑΣͺΑ" ).to_lower () == S (" ασͺα" ));
234
234
235
235
CHECK (S (" βους" ).to_upper () == S (" ΒΟΥΣ" ));
236
+
237
+ CHECK (S (" \U00010400 " ).to_lower () == S (" \U00010428 " ));
236
238
}
237
239
238
240
TEST_CASE ( " Trim" , " [general]" ) {
You can’t perform that action at this time.
0 commit comments