1 #ifndef INCLUDED_U5E_NORMALIZATION_FORM_KC 2 #define INCLUDED_U5E_NORMALIZATION_FORM_KC 5 #include <u5e/basic_grapheme.hpp> 6 #include <u5e/utf32ne_string.hpp> 7 #include <u5e/filter.hpp> 8 #include <u5e/compatibility_and_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
30 (grapheme.codepoint_begin(),
31 grapheme.codepoint_end(),
52 return count - compositions;
basic_encodedstring< utf32ne, std::basic_string< int > > utf32ne_string
A basic_encodedstring of utf32ne and std::basic_string<int>
int normalization_form_kc(basic_grapheme< InputStorageType > grapheme, OutputStorageType &output)
u5e::filter algorithm for normalizing graphemes
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.