diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-29 23:04:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 23:04:39 +0200 |
commit | bdcc8741e4826ce27850bbffa5880c57451e3be5 (patch) | |
tree | 4ab2740cb4177e3639f5700dcc99aab70af19cbc | |
parent | 44012fa61db860e66182fd8ea0b7a11de9cd75a9 (diff) | |
parent | b7a66a820b88002e734a8e7e7c31992cb7d37fdd (diff) |
Merge pull request #51009 from raulsntos/fix-csharp-split
Use `allowEmpty` parameter in Split
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs index b182f1f15e..d9665cbf2b 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs @@ -1108,7 +1108,7 @@ namespace Godot /// </summary> public static string[] Split(this string instance, string divisor, bool allowEmpty = true) { - return instance.Split(new[] { divisor }, StringSplitOptions.RemoveEmptyEntries); + return instance.Split(new[] { divisor }, allowEmpty ? StringSplitOptions.None : StringSplitOptions.RemoveEmptyEntries); } /// <summary> |