57 int rowCount,
int columnCount,
58 string leftParenth,
string rightParenth,
59 string divider,
int whitespacecount)
64 int rowCount,
int columnCount,
65 string leftParenth,
string rightParenth,
66 string divider,
int whitespacecount)
71 int rowCount,
int columnCount,
72 string leftParenth,
string rightParenth,
73 string divider,
int whitespacecount,
74 string openBracket,
string closeBracket)
76 StringBuilder builder =
new StringBuilder(
77 rowCount * (leftParenth.Length + rightParenth.Length) +
78 rowCount * columnCount * (1 + divider.Length + openBracket.Length + closeBracket.Length + whitespacecount));
81 for (
int row = 0; row < rowCount; ++row)
83 builder.Append(leftParenth);
84 builder.Append(
' ', whitespacecount);
85 for (
int col = 0; col < columnCount; ++col)
87 builder.Append(openBracket);
88 builder.Append(index);
89 builder.Append(closeBracket);
90 if (col != columnCount - 1)
92 builder.Append(divider);
94 builder.Append(
' ', whitespacecount);
97 builder.Append(rightParenth);
99 return builder.ToString();
static string GenerateFormatStringInternal(int rowCount, int columnCount, string leftParenth, string rightParenth, string divider, int whitespacecount, string openBracket, string closeBracket)
static string CreateMatrixFormatableString(int RowCount, int ColumnCount)
static string CreateMatrixFormatString(int RowCount, int ColumnCount)
static string CreateFormatString(int rowCount, int columnCount, string leftParenth, string rightParenth, string divider, int whitespacecount)
static string CreateVectorFormatableString(int Count)
static string CreateVectorFormatString(int Count)
static string CreateFormatableString(int rowCount, int columnCount, string leftParenth, string rightParenth, string divider, int whitespacecount)