public static string ManyToOne(IEnumerable <string> values, ListFormat listFormat) { using var f = listFormat.CreateFormatter(); foreach (var value in values) { f.Append(value); } f.AppendEnd(); return(f.OutputBuilder.ToString()); }
public static string ManyToOne(IEnumerable <string> values) { var formatter = OneToManyListFormat.CreateFormatter(); foreach (var value in values) { formatter.Append(value); } formatter.AppendEnd(); return(formatter.Output); }
public static string ManyToOne(IEnumerable <string> values, ListFormat listFormat) { var formatter = listFormat.CreateFormatter(StringBuilderEx.Acquire()); foreach (var value in values) { formatter.Append(value); } formatter.AppendEnd(); return(formatter.OutputBuilder.ToStringAndRelease()); }