summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2021-08-20 13:50:57 +0200
committerRaul Santos <raulsntos@gmail.com>2021-08-20 13:52:57 +0200
commitf6a700e264bd6b7c0ffd0f55e5c2fd0dceaa1859 (patch)
tree3fbf56b0637483697bdc14b173f9e70d6dac04c9 /modules/mono
parent75697c0dfda2c4bbb5456b78d54cd6a2664c8a49 (diff)
Rename C# string extensions to follow GDScript
Follow up to d9d77291bca8dd1e87aa4d9e40de96d99e5ef1f6. Renames `String.Extension` -> `String.GetExtension()` and `String.BaseName()` -> `String.GetBaseName()`. This makes those methods more consistent with GDScript and with the `GetBaseDir` method.
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index d9665cbf2b..6ce148d51e 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -64,7 +64,7 @@ namespace Godot
/// <summary>
/// If the string is a path to a file, return the path to the file without the extension.
/// </summary>
- public static string BaseName(this string instance)
+ public static string GetBaseName(this string instance)
{
int index = instance.LastIndexOf('.');
@@ -339,7 +339,7 @@ namespace Godot
/// <summary>
/// If the string is a path to a file, return the extension.
/// </summary>
- public static string Extension(this string instance)
+ public static string GetExtension(this string instance)
{
int pos = instance.FindLast(".");