Use `allowEmpty` parameter in Split

(cherry picked from commit b7a66a820b)
This commit is contained in:
Raul Santos 2021-07-27 23:16:10 +02:00 committed by Rémi Verschelde
parent c717c97819
commit 6a0155393a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -1109,7 +1109,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>