u5e
UnicodeTextC++Library
compatibility_and_canonical_decomposition.hpp
1 #ifndef INCLUDED_U5E_COMPATIBILITY_AND_CANONICAL_DECOMPOSITION
2 #define INCLUDED_U5E_COMPATIBILITY_AND_CANONICAL_DECOMPOSITION
3 
4 #include <iterator>
5 #include <algorithm>
6 #include <experimental/string_view>
7 
8 #include <u5e/codepoint.hpp>
9 #include <u5e/codepoint_decomposition.hpp>
10 #include <u5e/props/compatibility_and_canonical_decomposition_mapping.hpp>
11 #include <u5e/utf32ne_string_view.hpp>
12 
13 namespace u5e {
14 
15  /**
16  * \brief Perform compatibility and canonical decomposition
17  *
18  * This is one step of the normalization process, you probably want
19  * to use that instead.
20  *
21  * This is meant to be used as an operation for u5e::filter.
22  *
23  * \tparam OutputStringType the output string type to be used.
24  * Because this reads data from the database, the returned data is
25  * utf32ne, so you need an OutputStringType that is compatible with
26  * that.
27  *
28  */
29  template <typename OutputStringType>
31  (const codepoint input,
32  OutputStringType& output) {
33  return codepoint_decomposition
34  ( input,
35  output,
37  }
38 
39 }
40 
41 #endif
main u5e namespace
Native representation of a codepoint.
Definition: codepoint.hpp:15
int compatibility_and_canonical_decomposition(const codepoint input, OutputStringType &output)
Perform compatibility and canonical decomposition.
codepoint property handling