[Core] Add case-insensitive String::containsn

This commit is contained in:
A Thousand Ships 2024-05-06 10:26:10 +02:00
parent 281fe39929
commit b4c6cc7d82
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
23 changed files with 64 additions and 32 deletions

View file

@ -50,7 +50,7 @@ private:
if (p_path.contains("\\")) {
String project_path = ProjectSettings::get_singleton()->get_resource_path();
String path = p_path.replace("\\", "/");
return path.findn(project_path) != -1;
return path.containsn(project_path);
}
return p_path.begins_with(ProjectSettings::get_singleton()->get_resource_path());
}