|
namespace newcle.us.Utilities
|
|
{
|
|
public class StringExtensions
|
|
{
|
|
public static string FormatRow(object[] values, int[] widths)
|
|
{
|
|
string format = "|";
|
|
for (int i = 0; i < values.Length; i++)
|
|
{
|
|
format += $" {{{i},-{widths[i]}}} |";
|
|
}
|
|
return String.Format(format, values);
|
|
}
|
|
}
|
|
}
|