Merge pull request #109433 from KoBeWi/hastension

Add `has_extension()` method to String
This commit is contained in:
Thaddeus Crews
2025-10-31 09:23:30 -05:00
29 changed files with 46 additions and 48 deletions

View File

@ -1593,8 +1593,7 @@ bool ResourceFormatLoaderJSON::handles_type(const String &p_type) const {
}
String ResourceFormatLoaderJSON::get_resource_type(const String &p_path) const {
String el = p_path.get_extension().to_lower();
if (el == "json") {
if (p_path.has_extension("json")) {
return "JSON";
}
return "";