String: Add contains().

This commit is contained in:
Anilforextra
2022-02-03 21:48:38 +05:45
parent bf12719cca
commit adbe948bda
57 changed files with 142 additions and 119 deletions

View File

@ -430,7 +430,7 @@ Error ResourceLoaderText::load() {
}
}
if (path.find("://") == -1 && path.is_relative_path()) {
if (!path.contains("://") && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}
@ -774,7 +774,7 @@ void ResourceLoaderText::get_dependencies(FileAccess *p_f, List<String> *p_depen
}
}
if (!using_uid && path.find("://") == -1 && path.is_relative_path()) {
if (!using_uid && !path.contains("://") && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}