initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace lxc_songlist.Services;
|
||||
|
||||
public static partial class TextNormalizer
|
||||
{
|
||||
public static string DisplayText(string value)
|
||||
{
|
||||
return WhitespaceRegex().Replace(value.Trim(), " ");
|
||||
}
|
||||
|
||||
public static string Key(string value)
|
||||
{
|
||||
return DisplayText(value).ToLowerInvariant();
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"\s+")]
|
||||
private static partial Regex WhitespaceRegex();
|
||||
}
|
||||
Reference in New Issue
Block a user