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:
parent
5fce01c15c
commit
18cdc63883
9 changed files with 119 additions and 44 deletions
16
src/Extensions/MarkdownExtensions.cs
Normal file
16
src/Extensions/MarkdownExtensions.cs
Normal 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}";
|
||||
}
|
||||
}
|
Reference in a new issue