mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-29 09:12:40 +00:00
Refactor
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace DiscordChatExporter.Core.Utils.Extensions;
|
||||
|
||||
@@ -25,6 +26,9 @@ public static class StringExtensions
|
||||
}
|
||||
}
|
||||
|
||||
public static string ToDashCase(this string str) =>
|
||||
Regex.Replace(str, @"(\p{Ll})(\p{Lu})", "$1-$2");
|
||||
|
||||
public static StringBuilder AppendIfNotEmpty(this StringBuilder builder, char value) =>
|
||||
builder.Length > 0
|
||||
? builder.Append(value)
|
||||
|
||||
Reference in New Issue
Block a user