Skip to content

Commit

Permalink
karm-base: Added utf16 string litteral.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Dec 18, 2024
1 parent 4b16492 commit 76df3f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libs/karm-base/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,12 @@ inline constexpr Karm::Str operator""s(char const *buf, usize len) {
return {buf, len};
}

inline constexpr Karm::_Str<Karm::Utf8> operator""_s8(char const *buf, usize len) {
return {buf, len};
}

inline constexpr Karm::_Str<Karm::Utf16> operator""_s16(char16_t const *buf, usize len) {
return {reinterpret_cast<u16 const *>(buf), len};
}

#pragma clang diagnostic pop

0 comments on commit 76df3f4

Please sign in to comment.