diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-23 15:14:57 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-23 15:14:57 -0400 |
| commit | 07791d46a571d3d6eed23e98ec0fe1c46ea0d37f (patch) | |
| tree | dc34a04c700f8837c557c511edab20ce9816d82d /MediaBrowser.Controller/Extensions/BaseExtensions.cs | |
| parent | 48296834028bdfaf782132258d87fdab42f528eb (diff) | |
rework scheduled tasks in preparation of common project going portable
Diffstat (limited to 'MediaBrowser.Controller/Extensions/BaseExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Extensions/BaseExtensions.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Extensions/BaseExtensions.cs b/MediaBrowser.Controller/Extensions/BaseExtensions.cs new file mode 100644 index 000000000..84a9b1524 --- /dev/null +++ b/MediaBrowser.Controller/Extensions/BaseExtensions.cs @@ -0,0 +1,25 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Text; +using MediaBrowser.Model.Cryptography; + +namespace MediaBrowser.Controller.Extensions +{ + /// <summary> + /// Class BaseExtensions + /// </summary> + public static class BaseExtensions + { + public static ICryptographyProvider CryptographyProvider { get; set; } + + public static string RemoveDiacritics(this string text) + { + return String.Concat( + text.Normalize(NormalizationForm.FormD) + .Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) != + UnicodeCategory.NonSpacingMark) + ).Normalize(NormalizationForm.FormC); + } + } +} |
