26 lines
733 B
C#
26 lines
733 B
C#
namespace PARR.EsppSync.Helpers
|
|
{
|
|
/// <summary>
|
|
/// Хелперы для EsppSync
|
|
/// </summary>
|
|
public static class EsppSyncHelpers
|
|
{
|
|
/// <summary>
|
|
/// Првести строку в стандарт сравнения (для сравнения объектов)
|
|
/// </summary>
|
|
/// <param name="str"></param>
|
|
/// <returns></returns>
|
|
public static string Normalize(string? str)
|
|
{
|
|
if (str == null)
|
|
return string.Empty;
|
|
|
|
str = str.Replace("\r", string.Empty);
|
|
str = str.Replace("\n", string.Empty);
|
|
str = str.Replace(" ", string.Empty);
|
|
|
|
return str.ToLower();
|
|
}
|
|
}
|
|
}
|