mayb
About
Photos
C#.NET
Golang
More...
linux
git
PowerShell
JavaScript
Umbraco
windows
Regex
ElasticSearch
db
MySql
SqlServer
好记性不如烂笔头。
当前位置:
首页
>
C#.NET
求一串混合字符的长度(中英文相间的)
string str = "hello world 时间你好!";
int len = Encoding.GetEncoding("GB18030").GetBytes(str).Length;