private IndentCode ( string indent, string code ) : string | ||
indent | string | |
code | string | |
리턴 | string |
private string IndentCode(string indent, string code)
{
string[] lines = code.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
for (int ix = 0; ix < lines.Length; ++ix) {
lines[ix] = string.Format("{0}{1}", indent, lines[ix]);
}
return string.Join("\r\n", lines);
}