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

Function is_rtl_label

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

An RTL label is a label that contains at least one character of type R, AL, or AN. https://www.rfc-editor.org/rfc/rfc5893#section-2

Source from the content-addressed store, hash-verified

9004// An RTL label is a label that contains at least one character of type R, AL,
9005// or AN. https://www.rfc-editor.org/rfc/rfc5893#section-2
9006inline static bool is_rtl_label(const std::u32string_view label) noexcept {
9007 const size_t mask =
9008 (1u << direction::R) | (1u << direction::AL) | (1u << direction::AN);
9009
9010 size_t directions = 0;
9011 for (size_t i = 0; i < label.size(); i++) {
9012 directions |= 1u << find_direction(label[i]);
9013 }
9014 return (directions & mask) != 0;
9015}
9016
9017bool is_label_valid(const std::u32string_view label) {
9018 if (label.empty()) {

Callers 1

is_label_validFunction · 0.85

Calls 2

find_directionFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected