Browse Source

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

Max Hilbrunner 6 months ago
parent
commit
3275116304
4 changed files with 6 additions and 6 deletions
  1. 1 1
      core/string/ustring.h
  2. 1 1
      core/variant/variant_call.cpp
  3. 2 2
      doc/classes/String.xml
  4. 2 2
      doc/classes/StringName.xml

+ 1 - 1
core/string/ustring.h

@@ -517,7 +517,7 @@ public:
 	String rstrip(const String &p_chars) const;
 	String rstrip(const String &p_chars) const;
 	String get_extension() const;
 	String get_extension() const;
 	String get_basename() 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;
 	char32_t unicode_at(int p_idx) const;
 
 
 	CharString ascii(bool p_allow_extended = false) const;
 	CharString ascii(bool p_allow_extended = false) const;

+ 1 - 1
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(rstrip, sarray("chars"), varray());
 	bind_string_method(get_extension, sarray(), varray());
 	bind_string_method(get_extension, sarray(), varray());
 	bind_string_method(get_basename, 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(unicode_at, sarray("at"), varray());
 	bind_string_method(indent, sarray("prefix"), varray());
 	bind_string_method(indent, sarray("prefix"), varray());
 	bind_string_method(dedent, sarray(), varray());
 	bind_string_method(dedent, sarray(), varray());

+ 2 - 2
doc/classes/String.xml

@@ -757,9 +757,9 @@
 		</method>
 		</method>
 		<method name="path_join" qualifiers="const">
 		<method name="path_join" qualifiers="const">
 			<return type="String" />
 			<return type="String" />
-			<param index="0" name="file" type="String" />
+			<param index="0" name="path" type="String" />
 			<description>
 			<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].
 				[b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].
 			</description>
 			</description>
 		</method>
 		</method>

+ 2 - 2
doc/classes/StringName.xml

@@ -665,9 +665,9 @@
 		</method>
 		</method>
 		<method name="path_join" qualifiers="const">
 		<method name="path_join" qualifiers="const">
 			<return type="String" />
 			<return type="String" />
-			<param index="0" name="file" type="String" />
+			<param index="0" name="path" type="String" />
 			<description>
 			<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].
 				[b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].
 			</description>
 			</description>
 		</method>
 		</method>