|M| 一段文字如何拆成数组并显示出来
如我有
如何让 <br> 一段 <br> 文字如何 <br> 拆成数组 <br> 并显示出来
将他们以 <br> 拆分到到
ArrayList中名为myList
谢谢
急
[解决办法]
晕死了
split
[解决办法]
string str = "如何让 <br> 一段 <br> 文字如何 <br> 拆成数组 <br> 并显示出来 "; string[] ary = System.Text.RegularExpressions.Regex.Split(str, " <br> ");
[解决办法]
string[] arr = Text.Split(new char[] { ' < ', 'b ', 'r ', '> '}););
[解决办法]
\r\n理论上应该是可以的. System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(200, 200); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp); g.DrawString( "我\r\n的\r\n测试\r\n ", new System.Drawing.Font( "宋体 ", 10), new System.Drawing.SolidBrush(System.Drawing.Color.Red),new System.Drawing.RectangleF(0,0,200,200)); bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);
[解决办法]
string[] arr = string.Split(@ " <br/> ".ToCharArray());
OK~!