Files
basic-computer-games/69_Pizza/csharp/StringBuilderExtensions.cs
Martin Thoma e64fb6795c MAINT: Apply pre-commit
Remove byte-order-marker pre-commit check as there would be
many adjustments necessary
2022-03-05 09:29:23 +01:00

22 lines
688 B
C#

using System.Text;
namespace Pizza
{
internal static class StringBuilderExtensions
{
/// <summary>
/// Extensions for adding new lines of specific value.
/// </summary>
/// <param name="stringBuilder">Extended class.</param>
/// <param name="value">Value which will be repeated.</param>
/// <param name="numberOfLines">Number of lines that will be appended.</param>
public static void AppendLine(this StringBuilder stringBuilder, string value, int numberOfLines)
{
for (int i = 0; i < numberOfLines; i++)
{
stringBuilder.AppendLine(value);
}
}
}
}