Ada
4.1.1
Fast spec-compliant URL parser
Toggle main menu visibility
Loading...
Searching...
No Matches
normalization.h
Go to the documentation of this file.
1
#ifndef ADA_IDNA_NORMALIZATION_H
2
#define ADA_IDNA_NORMALIZATION_H
3
4
#include <string>
5
#include <string_view>
6
7
namespace
ada::idna
{
8
9
// Returns true if `input` is already in Unicode Normalization Form C.
10
// Requires that internal tables have been loaded (call ensure via normalize
11
// or map first, or this returns false if tables are unavailable).
12
[[nodiscard]]
bool
is_already_nfc
(std::u32string_view input)
noexcept
;
13
14
// Normalize the characters according to IDNA (Unicode Normalization Form C).
15
// Returns false if the internal Unicode tables could not be loaded; in that
16
// case `input` is left unchanged. Skips work when the string is already NFC.
17
[[nodiscard]]
bool
normalize
(std::u32string& input);
18
19
}
// namespace ada::idna
20
#endif
ada::idna
Definition
identifier.h:7
ada::idna::normalize
bool normalize(std::u32string &input)
Definition
ada_idna.cpp:5744
ada::idna::is_already_nfc
bool is_already_nfc(std::u32string_view input) noexcept
Definition
ada_idna.cpp:5623