Rename "file" param for str.path_join() to "path"

This commit is contained in:
Max Hilbrunner 2025-02-24 23:52:33 +01:00
parent 39c201ca58
commit 3275116304
4 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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());

View File

@ -757,9 +757,9 @@
</method>
<method name="path_join" qualifiers="const">
<return type="String" />
<param index="0" name="file" type="String" />
<param index="0" name="path" type="String" />
<description>
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].
</description>
</method>

View File

@ -665,9 +665,9 @@
</method>
<method name="path_join" qualifiers="const">
<return type="String" />
<param index="0" name="file" type="String" />
<param index="0" name="path" type="String" />
<description>
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].
</description>
</method>