/// <summary> /// Adds text string at the end of stringbuilder and then adds "postDelimited" character/string /// at the end, if there is none. /// </summary> /// <param name="builder">Textbuilder to alter.</param> /// <param name="text">String to append.</param> /// <param name="postDelimiter">Delimiter added at the end of textBuilder, if is not already there. </param> /// <remarks> /// If added text already contains "postDelimited" char/string at its end, nothing will be added. /// </remarks> /// public static void AppendPostDelimited(this System.Text.StringBuilder builder, string text, char postDelimiter) { builder.AppendPostDelimited(text, char.ToString(postDelimiter)); }
/// <summary> /// Adds string into string builder and then empty space at the end, if there is none. /// </summary> /// <param name="builder"></param> /// <param name="text"></param> /// public static void AppendPostSpaced(this System.Text.StringBuilder builder, string text) { builder.AppendPostDelimited(text, " "); }