MCPcopy Create free account
hub / github.com/NativeScript/android / sort_marks

Function sort_marks

test-app/runtime/src/main/cpp/ada/ada.cpp:7864–7878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7862}
7863
7864void sort_marks(std::u32string& input) {
7865 for (size_t idx = 1; idx < input.size(); idx++) {
7866 uint8_t ccc = get_ccc(input[idx]);
7867 if (ccc == 0) {
7868 continue;
7869 } // Skip non-combining characters.
7870 auto current_character = input[idx];
7871 size_t back_idx = idx;
7872 while (back_idx != 0 && get_ccc(input[back_idx - 1]) > ccc) {
7873 input[back_idx] = input[back_idx - 1];
7874 back_idx--;
7875 }
7876 input[back_idx] = current_character;
7877 }
7878}
7879
7880void decompose_nfc(std::u32string& input) {
7881 /**

Callers 1

decompose_nfcFunction · 0.85

Calls 2

get_cccFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected