/// <summary>
/// 直列输出
/// </summary>
/// <param name="split">分割符</param>
public void Print(char split)
{
if (Body[0] == split)
{
Body = Body.Substring(1);
}
if (Body[Body.Length - 1] == split)
{
Body = Body.Substring(0, Body.Length - 1);
}
string[] divisionStr = Body.Split(split);
int maxRom = 0;
for (int i = 0; i <= divisionStr.Length - 1; i++)//得到分割数组最大长度
{
if (maxRom < divisionStr[i].Length)
{
maxRom = divisionStr[i].Length;
}
}
for (int i = 0; i <= maxRom - 1; i++) //控制行
{
for (int j = divisionStr.Length - 1; j >= 0; j--)//控制列
{
if (divisionStr[j].Length > i)
{
System.Console.Write(divisionStr[j][i]+" ");
}
else
{
System.Console.Write(" ");
}
}
System.Console.WriteLine();
}
}
}
posted @ 2008-10-24 00:47 Jonas 阅读(150) 评论(2) 编辑

