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

Function find_direction

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

Source from the content-addressed store, hash-verified

8978// CheckJoiners and CheckBidi are true for URL specification.
8979
8980inline static direction find_direction(uint32_t code_point) noexcept {
8981 auto it = std::lower_bound(
8982 std::begin(dir_table), std::end(dir_table), code_point,
8983 [](const directions& d, uint32_t c) { return d.final_code < c; });
8984
8985 // next check is almost surely in vain, but we use it for safety.
8986 if (it == std::end(dir_table)) {
8987 return direction::NONE;
8988 }
8989 // We have that d.final_code >= c.
8990 if (code_point >= it->start_code) {
8991 return it->direct;
8992 }
8993 return direction::NONE;
8994}
8995
8996inline static size_t find_last_not_of_nsm(
8997 const std::u32string_view label) noexcept {

Callers 3

find_last_not_of_nsmFunction · 0.85
is_rtl_labelFunction · 0.85
is_label_validFunction · 0.85

Calls 2

beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected