Ada
4.1.1
Fast spec-compliant URL parser
Toggle main menu visibility
Loading...
Searching...
No Matches
mapping.h
Go to the documentation of this file.
1
#ifndef ADA_IDNA_MAPPING_H
2
#define ADA_IDNA_MAPPING_H
3
4
#include <string>
5
#include <string_view>
6
7
namespace
ada::idna
{
8
9
// If the input is ascii, then the mapping is just -> lower case.
10
void
ascii_map
(
char
* input,
size_t
length);
11
// Map the characters according to IDNA, returning the empty string on error.
12
std::u32string
map
(std::u32string_view input);
13
// Map into an existing buffer (cleared on entry). Returns false if any code
14
// point is disallowed. Reusing the buffer avoids repeated heap allocations
15
// when called in a loop over multiple labels.
16
bool
map
(std::u32string_view input, std::u32string& out);
17
18
}
// namespace ada::idna
19
20
#endif
ada::idna
Definition
identifier.h:7
ada::idna::ascii_map
void ascii_map(char *input, size_t length)
Definition
ada_idna.cpp:5219
ada::idna::map
std::u32string map(std::u32string_view input)
Definition
ada_idna.cpp:5288