Browse Source

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.
Raul Santos 4 years ago
parent
commit
f6a700e264
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs

+ 2 - 2
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(".");