1 #ifndef INCLUDED_U5E_NORMALIZATION_FORM_C 2 #define INCLUDED_U5E_NORMALIZATION_FORM_C 5 #include <u5e/basic_grapheme.hpp> 6 #include <u5e/utf32ne_string.hpp> 7 #include <u5e/filter.hpp> 8 #include <u5e/canonical_decomposition.hpp> 9 #include <u5e/canonical_combining_order.hpp> 10 #include <u5e/canonical_composition.hpp> 22 template <
typename InputStorageType,
23 typename OutputStorageType = InputStorageType>
25 OutputStorageType& output) {
29 int count =
u5e::filter(grapheme.codepoint_begin(),
30 grapheme.codepoint_end(),
51 return count - compositions;
int normalization_form_c(basic_grapheme< InputStorageType > grapheme, OutputStorageType &output)
u5e::filter algorithm for normalizing graphemes
basic_encodedstring< utf32ne, std::basic_string< int > > utf32ne_string
A basic_encodedstring of utf32ne and std::basic_string<int>
StorageType::iterator canonical_composition(StorageType &data, int *count)
performs in-place canonical composition.
bool canonical_combining_order(int a, int b)
compare codepoints according to the canonical combining order
iterator codepoint_begin()
Represents a single grapheme cluster.