MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / file_cmp_common

Function file_cmp_common

core/string/ustring.cpp:690–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690static _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
706signed char String::filecasecmp_to(const String &p_str) const {
707 const char32_t *this_str = get_data();

Callers 2

filecasecmp_toMethod · 0.85
filenocasecmp_toMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected