mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			627 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			627 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Globalization;
 | 
						|
using System.Linq;
 | 
						|
using System.Text;
 | 
						|
 | 
						|
namespace MediaBrowser.Controller.Extensions
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Class BaseExtensions
 | 
						|
    /// </summary>
 | 
						|
    public static class StringExtensions
 | 
						|
    {
 | 
						|
        public static string RemoveDiacritics(this string text)
 | 
						|
        {
 | 
						|
            return String.Concat(
 | 
						|
                text.Normalize(NormalizationForm.FormD)
 | 
						|
                .Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) !=
 | 
						|
                                              UnicodeCategory.NonSpacingMark)
 | 
						|
              ).Normalize(NormalizationForm.FormC);
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |