Files
NetUnicodeInfo/UnicodeInformation/UnicodeCategoryExtensions.cs
T

25 lines
903 B
C#
Raw Normal View History

2017-09-07 23:10:17 +02:00
using System.Globalization;
namespace System.Unicode
{
2014-12-16 02:32:00 +01:00
/// <summary>Provides extensions to the <see cref="UnicodeCategory"/> type.</summary>
public static class UnicodeCategoryExtensions
{
2014-12-16 02:32:00 +01:00
/// <summary>Gets the short name of the unicode category.</summary>
/// <param name="category">The category whose short name should be retrieved.</param>
/// <returns>The short name of the unicode category.</returns>
public static string GetShortName(this UnicodeCategory category)
{
return UnicodeCategoryInfo.Get(category).ShortName;
}
2014-12-16 02:32:00 +01:00
/// <summary>Gets the long name of the unicode category.</summary>
/// <param name="category">The category whose long name should be retrieved.</param>
/// <returns>The long name of the unicode category.</returns>
public static string GetLongName(this UnicodeCategory category)
{
return UnicodeCategoryInfo.Get(category).LongName;
}
}
}