Add has_extension() method to String

This commit is contained in:
kobewi committed 2025-08-12 13:15:16 +02:00
1 parent ca452113d4
commit a33ae0be0e
29 files changed
+46 -48

No files matched your search

+1 -1
View File
@@ -2892,7 +2892,7 @@ bool ResourceFormatLoaderCSharpScript::handles_type(const String &p_type) const
}
String ResourceFormatLoaderCSharpScript::get_resource_type(const String &p_path) const {
return p_path.get_extension().to_lower() == "cs" ? CSharpLanguage::get_singleton()->get_type() : "";
return p_path.has_extension("cs") ? CSharpLanguage::get_singleton()->get_type() : "";
}
Error ResourceFormatSaverCSharpScript::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {