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 1da4e9e608
commit ecb973ab02
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

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