Case-insensitive "text ends with suffix" over [text, text + len). */
| 804 | |
| 805 | /* Case-insensitive "text ends with suffix" over [text, text + len). */ |
| 806 | static bool span_ends_with_ci(const char *text, size_t len, const char *suffix) { |
| 807 | size_t sl = strlen(suffix); |
| 808 | if (len < sl) { |
| 809 | return false; |
| 810 | } |
| 811 | const char *tail = text + (len - sl); |
| 812 | for (size_t i = 0; i < sl; i++) { |
| 813 | char a = tail[i]; |
| 814 | if (a >= 'A' && a <= 'Z') { |
| 815 | a = (char)(a - 'A' + 'a'); |
| 816 | } |
| 817 | if (a != suffix[i]) { |
| 818 | return false; |
| 819 | } |
| 820 | } |
| 821 | return true; |
| 822 | } |
| 823 | |
| 824 | bool cbm_service_pattern_is_client_navigation(bool js_family, const char *callee_name) { |
| 825 | if (!js_family || !callee_name || !callee_name[0]) { |
no outgoing calls
no test coverage detected