Ada 4.1.1
Fast spec-compliant URL parser
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
7namespace ada::idna {
8
9// If the input is ascii, then the mapping is just -> lower case.
10void ascii_map(char* input, size_t length);
11// Map the characters according to IDNA, returning the empty string on error.
12std::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.
16bool map(std::u32string_view input, std::u32string& out);
17
18} // namespace ada::idna
19
20#endif
void ascii_map(char *input, size_t length)
std::u32string map(std::u32string_view input)