mirror of https://github.com/godotengine/godot
Merge 41517d4e29 into 15ff450680
This commit is contained in:
commit
4db29fa973
|
|
@ -3612,10 +3612,6 @@ bool String::begins_with(const char *p_string) const {
|
|||
return *p_string == 0;
|
||||
}
|
||||
|
||||
bool String::is_enclosed_in(const String &p_string) const {
|
||||
return begins_with(p_string) && ends_with(p_string);
|
||||
}
|
||||
|
||||
bool String::is_subsequence_of(const String &p_string) const {
|
||||
return _base_is_subsequence_of(p_string, false);
|
||||
}
|
||||
|
|
@ -3624,10 +3620,6 @@ bool String::is_subsequence_ofn(const String &p_string) const {
|
|||
return _base_is_subsequence_of(p_string, true);
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
|
|
|||
|
|
@ -417,10 +417,14 @@ public:
|
|||
bool begins_with(const char *p_string) const;
|
||||
bool ends_with(const String &p_string) const;
|
||||
bool ends_with(const char *p_string) const;
|
||||
bool is_enclosed_in(const String &p_string) const;
|
||||
bool is_enclosed_in(char32_t p_char) const {
|
||||
return length() >= 2 && ptr()[0] == p_char && ptr()[length() - 1] == p_char;
|
||||
}
|
||||
bool is_quoted() const {
|
||||
return is_enclosed_in('"') || is_enclosed_in('\'');
|
||||
}
|
||||
bool is_subsequence_of(const String &p_string) const;
|
||||
bool is_subsequence_ofn(const String &p_string) const;
|
||||
bool is_quoted() const;
|
||||
bool is_lowercase() const;
|
||||
Vector<String> bigrams() const;
|
||||
float similarity(const String &p_string) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue