Fix 9 design majors: ITrackService interface, IsDescending, ArrayPool base, CliUtils, sort sentinel cleanup, content controller via TrackService, Skip property

This commit is contained in:
Daniel Harvey
2026-05-17 16:10:56 -04:00
parent fc5b8de81a
commit 4c9bf0ca8d
15 changed files with 97 additions and 71 deletions
+16
View File
@@ -0,0 +1,16 @@
namespace DeepDrftCli.Utils;
internal static class CliUtils
{
/// <summary>
/// Truncates a string to fit within the specified column width,
/// appending "..." when the string is longer.
/// </summary>
internal static string TruncateString(string input, int maxLength)
{
if (string.IsNullOrEmpty(input))
return string.Empty;
return input.Length <= maxLength ? input : input.Substring(0, maxLength - 3) + "...";
}
}