Merge pull request #66119 from raulsntos/dotnet/str-path-join
C#: Rename `PlusFile` to `PathJoin`
This commit is contained in:
commit
ca1ebf9fee
@ -1245,12 +1245,12 @@ namespace Godot
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the string is a path, this concatenates <paramref name="file"/>
|
/// If the string is a path, this concatenates <paramref name="file"/>
|
||||||
/// at the end of the string as a subpath.
|
/// at the end of the string as a subpath.
|
||||||
/// E.g. <c>"this/is".PlusFile("path") == "this/is/path"</c>.
|
/// E.g. <c>"this/is".PathJoin("path") == "this/is/path"</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="instance">The path that will be concatenated.</param>
|
/// <param name="instance">The path that will be concatenated.</param>
|
||||||
/// <param name="file">File name to concatenate with the path.</param>
|
/// <param name="file">File name to concatenate with the path.</param>
|
||||||
/// <returns>The concatenated path with the given file name.</returns>
|
/// <returns>The concatenated path with the given file name.</returns>
|
||||||
public static string PlusFile(this string instance, string file)
|
public static string PathJoin(this string instance, string file)
|
||||||
{
|
{
|
||||||
if (instance.Length > 0 && instance[instance.Length - 1] == '/')
|
if (instance.Length > 0 && instance[instance.Length - 1] == '/')
|
||||||
return instance + file;
|
return instance + file;
|
||||||
|
Loading…
Reference in New Issue
Block a user