jellyfin/MediaBrowser.Model/Extensions/ListHelper.cs

25 lines
568 B
C#
Raw Normal View History

2018-12-27 16:27:57 -07:00
using System;
namespace MediaBrowser.Model.Extensions
{
public static class ListHelper
{
public static bool ContainsIgnoreCase(string[] list, string value)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
foreach (var item in list)
{
if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
return false;
}
}
}