Skip to content

Commit 051712d

Browse files
committed
Merge pull request #103264 from mhilbrunner/docs-path-join
Rename "file" param for str.path_join() to "path"
2 parents c714743 + 3275116 commit 051712d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

core/string/ustring.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ class [[nodiscard]] String {
520520
String rstrip(const String &p_chars) const;
521521
String get_extension() const;
522522
String get_basename() const;
523-
String path_join(const String &p_file) const;
523+
String path_join(const String &p_path) const;
524524
char32_t unicode_at(int p_idx) const;
525525

526526
CharString ascii(bool p_allow_extended = false) const;

core/variant/variant_call.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ static void _register_variant_builtin_methods_string() {
18201820
bind_string_method(rstrip, sarray("chars"), varray());
18211821
bind_string_method(get_extension, sarray(), varray());
18221822
bind_string_method(get_basename, sarray(), varray());
1823-
bind_string_method(path_join, sarray("file"), varray());
1823+
bind_string_method(path_join, sarray("path"), varray());
18241824
bind_string_method(unicode_at, sarray("at"), varray());
18251825
bind_string_method(indent, sarray("prefix"), varray());
18261826
bind_string_method(dedent, sarray(), varray());

doc/classes/String.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,9 @@
757757
</method>
758758
<method name="path_join" qualifiers="const">
759759
<return type="String" />
760-
<param index="0" name="file" type="String" />
760+
<param index="0" name="path" type="String" />
761761
<description>
762-
Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary.
762+
Concatenates [param path] at the end of the string as a subpath, adding [code]/[/code] if necessary.
763763
[b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].
764764
</description>
765765
</method>

doc/classes/StringName.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,9 @@
665665
</method>
666666
<method name="path_join" qualifiers="const">
667667
<return type="String" />
668-
<param index="0" name="file" type="String" />
668+
<param index="0" name="path" type="String" />
669669
<description>
670-
Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary.
670+
Concatenates [param path] at the end of the string as a subpath, adding [code]/[/code] if necessary.
671671
[b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].
672672
</description>
673673
</method>

0 commit comments

Comments
 (0)