Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
punycode.h
1#ifndef SOURCEMETA_CORE_PUNYCODE_H_
2#define SOURCEMETA_CORE_PUNYCODE_H_
3
4#ifndef SOURCEMETA_CORE_PUNYCODE_EXPORT
5#include <sourcemeta/core/punycode_export.h>
6#endif
7
8// NOLINTBEGIN(misc-include-cleaner)
9#include <sourcemeta/core/punycode_error.h>
10// NOLINTEND(misc-include-cleaner)
11
12#include <istream> // std::istream
13#include <ostream> // std::ostream
14#include <string> // std::string, std::u32string
15#include <string_view> // std::string_view, std::u32string_view
16
25
26namespace sourcemeta::core {
27
28// See https://www.rfc-editor.org/rfc/rfc3492
29
48SOURCEMETA_CORE_PUNYCODE_EXPORT
49auto utf32_to_punycode(std::u32string_view input) -> std::string;
50
64SOURCEMETA_CORE_PUNYCODE_EXPORT
65auto utf8_to_punycode(std::istream &input, std::ostream &output) -> void;
66
77SOURCEMETA_CORE_PUNYCODE_EXPORT
78auto utf8_to_punycode(const std::string_view input) -> std::string;
79
99SOURCEMETA_CORE_PUNYCODE_EXPORT
100auto punycode_to_utf32(const std::string_view input) -> std::u32string;
101
115SOURCEMETA_CORE_PUNYCODE_EXPORT
116auto punycode_to_utf8(std::istream &input, std::ostream &output) -> void;
117
128SOURCEMETA_CORE_PUNYCODE_EXPORT
129auto punycode_to_utf8(const std::string_view input) -> std::string;
130
131} // namespace sourcemeta::core
132
133#endif
SOURCEMETA_CORE_PUNYCODE_EXPORT auto utf8_to_punycode(std::istream &input, std::ostream &output) -> void
SOURCEMETA_CORE_PUNYCODE_EXPORT auto punycode_to_utf8(std::istream &input, std::ostream &output) -> void
SOURCEMETA_CORE_PUNYCODE_EXPORT auto utf32_to_punycode(std::u32string_view input) -> std::string
SOURCEMETA_CORE_PUNYCODE_EXPORT auto punycode_to_utf32(const std::string_view input) -> std::u32string