You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #98278 from a-johnston/fuzzy-search-rebase
Add fuzzy string matching to quick open search
This commit is contained in:
@@ -3387,7 +3387,7 @@ int String::find(const char *p_str, int p_from) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int String::find_char(const char32_t &p_char, int p_from) const {
|
||||
int String::find_char(char32_t p_char, int p_from) const {
|
||||
return _cowdata.find(p_char, p_from);
|
||||
}
|
||||
|
||||
@@ -3624,6 +3624,10 @@ int String::rfind(const char *p_str, int p_from) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int String::rfind_char(char32_t p_char, int p_from) const {
|
||||
return _cowdata.rfind(p_char, p_from);
|
||||
}
|
||||
|
||||
int String::rfindn(const String &p_str, int p_from) const {
|
||||
// establish a limit
|
||||
int limit = length() - p_str.length();
|
||||
@@ -3837,6 +3841,15 @@ bool String::is_quoted() const {
|
||||
return is_enclosed_in("\"") || is_enclosed_in("'");
|
||||
}
|
||||
|
||||
bool String::is_lowercase() const {
|
||||
for (const char32_t *str = &operator[](0); *str; str++) {
|
||||
if (is_unicode_upper_case(*str)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int String::_count(const String &p_string, int p_from, int p_to, bool p_case_insensitive) const {
|
||||
if (p_string.is_empty()) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user