From 32751163045c053bcd0cb21afcc7e20f5f2813c8 Mon Sep 17 00:00:00 2001 From: Max Hilbrunner Date: Mon, 24 Feb 2025 23:52:33 +0100 Subject: [PATCH] Rename "file" param for str.path_join() to "path" --- core/string/ustring.h | 2 +- core/variant/variant_call.cpp | 2 +- doc/classes/String.xml | 4 ++-- doc/classes/StringName.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/string/ustring.h b/core/string/ustring.h index b8ebeb99d7..d46685e188 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -517,7 +517,7 @@ public: String rstrip(const String &p_chars) const; String get_extension() const; String get_basename() const; - String path_join(const String &p_file) const; + String path_join(const String &p_path) const; char32_t unicode_at(int p_idx) const; CharString ascii(bool p_allow_extended = false) const; diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 7521632974..d03a1f8e94 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1750,7 +1750,7 @@ static void _register_variant_builtin_methods_string() { bind_string_method(rstrip, sarray("chars"), varray()); bind_string_method(get_extension, sarray(), varray()); bind_string_method(get_basename, sarray(), varray()); - bind_string_method(path_join, sarray("file"), varray()); + bind_string_method(path_join, sarray("path"), varray()); bind_string_method(unicode_at, sarray("at"), varray()); bind_string_method(indent, sarray("prefix"), varray()); bind_string_method(dedent, sarray(), varray()); diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 68a7f67331..05e47b09c7 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -757,9 +757,9 @@ - + - Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary. + Concatenates [param path] at the end of the string as a subpath, adding [code]/[/code] if necessary. [b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code]. diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 96972706e5..74fe0ee45c 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -665,9 +665,9 @@ - + - Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary. + Concatenates [param path] at the end of the string as a subpath, adding [code]/[/code] if necessary. [b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].