Add StringBuilder & Markdown extensions (#206)

In this PR, I have added StringBuilder extensions to avoid `.Append`
reuse such as `.Append("- ").AppendLine()`

Closes #205

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-04 17:09:47 +03:00 committed by GitHub
parent 5fce01c15c
commit 18cdc63883
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 119 additions and 44 deletions

View file

@ -0,0 +1,16 @@
namespace Octobot.Extensions;
public static class MarkdownExtensions
{
/// <summary>
/// Formats a string to use Markdown Bullet formatting.
/// </summary>
/// <param name="text">The input text to format.</param>
/// <returns>
/// A markdown-formatted bullet string.
/// </returns>
public static string BulletPoint(string text)
{
return $"- {text}";
}
}