StringExtensions
namespace Relativity.Transfer
{
public static class StringExtensions
{
private const int BlockSize = 16;
public static string Truncate(this string phrase, int length)
{
if (string.IsNullOrEmpty(phrase) || phrase.Length < length || length - 3 < 0)
return phrase;
return phrase.Substring(0, length - 3) + "...";
}
}
}