Use allowEmpty parameter in Split

This commit is contained in:
Raul Santos 2021-07-27 23:16:10 +02:00
parent 4cfa9bc0f1
commit b7a66a820b

View file

@ -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>