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

Function adapt

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

Source from the content-addressed store, hash-verified

8007}
8008
8009static constexpr int32_t adapt(int32_t d, int32_t n, bool firsttime) {
8010 if (firsttime) {
8011 d = d / damp;
8012 } else {
8013 d = d / 2;
8014 }
8015 d += d / n;
8016 int32_t k = 0;
8017 while (d > ((base - tmin) * tmax) / 2) {
8018 d /= base - tmin;
8019 k += base;
8020 }
8021 return k + (((base - tmin + 1) * d) / (d + skew));
8022}
8023
8024bool punycode_to_utf32(std::string_view input, std::u32string &out) {
8025 // See https://github.com/whatwg/url/issues/803

Callers 3

punycode_to_utf32Function · 0.85
verify_punycodeFunction · 0.85
utf32_to_punycodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected