mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
24 lines
585 B
C#
24 lines
585 B
C#
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
|
||
|
namespace NzbDrone.Core.Helpers
|
||
|
{
|
||
|
public class SortHelper
|
||
|
{
|
||
|
public static string SkipArticles(string input)
|
||
|
{
|
||
|
var articles = new List<string> { "The ", "An ", "A " };
|
||
|
|
||
|
foreach (string article in articles)
|
||
|
{
|
||
|
if (input.ToLower().StartsWith(article, StringComparison.InvariantCultureIgnoreCase))
|
||
|
return input.Substring(article.Length).Trim();
|
||
|
}
|
||
|
|
||
|
return input;
|
||
|
}
|
||
|
}
|
||
|
}
|