mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 10:58:58 -07:00
30 lines
648 B
C#
30 lines
648 B
C#
#nullable disable
|
|
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
|
|
namespace MediaBrowser.Model.Extensions
|
|
{
|
|
// TODO: @bond remove
|
|
public static class ListHelper
|
|
{
|
|
public static bool ContainsIgnoreCase(string[] list, string value)
|
|
{
|
|
if (value == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
foreach (var item in list)
|
|
{
|
|
if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|