【发布时间】:2013-06-06 11:41:45
【问题描述】:
我需要删除转换为字符串的byte[]的前4句。
到目前为止我所拥有的:
//convert bytearray to string, so I can modify the string
string rawString = Convert.ToBase64String(rawByteArray);
//seperate lines
string[] textLines = Regex.Split(rawString, "\r\n");
//I need to substract the first 4 senctences of the string here!
//convert string back to byte array
byte[] cleanByteArray = rawstring.FromBase64String(rawString);
如何减去前 4 个句子?
提前致谢!
【问题讨论】:
-
定义“句子”?通过查看字符串如何找到它?例如,以
\n结尾。 -
确实如此。在抽象意义上,一个句子也可以以一个或三个点、感叹号、问号或分号结尾。
标签: c# string filter bytearray