-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUtf8.hpp
More file actions
25 lines (21 loc) · 909 Bytes
/
Utf8.hpp
File metadata and controls
25 lines (21 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
namespace cpp
{
namespace encoding
{
struct Utf8 final
{
static int getByteCount(const null&);
static int getByteCount(const char32_t& codepoint);
static int64_t getByteCount(const String& string);
static int getCharCount(const null&);
static int getCharCount(const char32_t& codepoint);
static int64_t getCharCount(const String& string);
static int encode(const null&, const cpp::marshal::View<uint8_t>& buffer);
static int encode(const char32_t& codepoint, const cpp::marshal::View<uint8_t>& buffer);
static int64_t encode(const String& string, const cpp::marshal::View<uint8_t>& buffer);
static char32_t codepoint(const cpp::marshal::View<uint8_t>& buffer);
static String decode(const cpp::marshal::View<uint8_t>& buffer);
};
}
}