| 688 | } |
| 689 | |
| 690 | static _FORCE_INLINE_ signed char file_cmp_common(const char32_t *&r_this_str, const char32_t *&r_that_str) { |
| 691 | // Compare leading `_` sequences. |
| 692 | while ((*r_this_str == '_' && *r_that_str) || (*r_this_str && *r_that_str == '_')) { |
| 693 | // Sort `_` lower than everything except `.` |
| 694 | if (*r_this_str != '_') { |
| 695 | return *r_this_str == '.' ? -1 : 1; |
| 696 | } else if (*r_that_str != '_') { |
| 697 | return *r_that_str == '.' ? 1 : -1; |
| 698 | } |
| 699 | r_this_str++; |
| 700 | r_that_str++; |
| 701 | } |
| 702 | |
| 703 | return 0; |
| 704 | } |
| 705 | |
| 706 | signed char String::filecasecmp_to(const String &p_str) const { |
| 707 | const char32_t *this_str = get_data(); |
no outgoing calls
no test coverage detected