110,545
社区成员
发帖
与我相关
我的任务
分享
string s = "\\u91cd\\u5e86\\u5730\\u4ea7\\uff0c";
string r = Regex.Replace(s, @"\\u([a-f0-9]{4})", m => ((char)ushort.Parse(m.Groups[1].Value, NumberStyles.HexNumber)).ToString());
Console.WriteLine(r);
string a = "\\u91cd\\u5e86\\u7684\\u957f\\u5b89\\uff0c";
a=a.Replace("\\", "");
Console.WriteLine(a);
结果如下:
u91cdu5e86u7684u957fu5b89uff0c
。。。好无力啊
有没有函数能将字串
"91cd5e867684957f5b89ff0c"
按照16进制,两个数字一组赋值给一个byte[]数组?