You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
682 B
27 lines
682 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace NzbDrone.Core.Helpers
|
|
{
|
|
public static class SortHelper
|
|
{
|
|
public static string IgnoreArticles(this string input)
|
|
{
|
|
if (String.IsNullOrEmpty(input))
|
|
return String.Empty;
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|