using System; namespace Jellyfin.Api.Helpers { /// /// Request Extensions. /// public static class RequestHelpers { /// /// Splits a string at a separating character into an array of substrings. /// /// The string to split. /// The char that separates the substrings. /// Option to remove empty substrings from the array. /// An array of the substrings. internal static string[] Split(string value, char separator, bool removeEmpty) { if (string.IsNullOrWhiteSpace(value)) { return Array.Empty(); } return removeEmpty ? value.Split(new[] { separator }, StringSplitOptions.RemoveEmptyEntries) : value.Split(separator); } } }