mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
14 lines
422 B
C#
14 lines
422 B
C#
using System.Text;
|
|
|
|
namespace CliFx.Internal
|
|
{
|
|
internal static class StringExtensions
|
|
{
|
|
public static string Repeat(this char c, int count) => new string(c, count);
|
|
|
|
public static string AsString(this char c) => c.Repeat(1);
|
|
|
|
public static StringBuilder AppendIfNotEmpty(this StringBuilder builder, char value) =>
|
|
builder.Length > 0 ? builder.Append(value) : builder;
|
|
}
|
|
} |