Nuked humanizer. Some of the strings might look worse but the output directory will no longer look terrible. Added stats for todo list command

This commit is contained in:
Kwoth
2024-05-02 22:14:25 +00:00
parent fc4858830c
commit 3ef05f8aa7
19 changed files with 104 additions and 66 deletions

View File

@@ -29,7 +29,17 @@ public static class StringExtensions
=> Regex.Replace(input, "<.*?>", string.Empty);
public static string? TrimTo(this string? str, int maxLength, bool hideDots = false)
=> hideDots ? str?.Truncate(maxLength, string.Empty) : str?.Truncate(maxLength);
{
if (hideDots)
{
return str?.Substring(0, maxLength);
}
if (str is null || str.Length <= maxLength)
return str;
return string.Concat(str.AsSpan(0, maxLength - 1), "…");
}
public static string ToTitleCase(this string str)
{