2021
01-13
01-13
C# 字符串与unicode互相转换实战案例
我就废话不多说了,大家还是直接看代码吧~///<summary>///字符串转Unicode///</summary>///<paramname="source">源字符串</param>///<returns>Unicode编码后的字符串</returns>publicstaticstringString2Unicode(stringsource){varbytes=Encoding.Unicode.GetBytes(source);varstringBuilder=newStringBuilder();for(vari=0;i<bytes.Length;i+=2){stringBuilder.AppendF...
继续阅读 >