[C#] 获得字符串的实际长度 →→→→→进入此内容的聊天室

来自 , 2020-10-25, 写在 C#, 查看 124 次.
URL http://www.code666.cn/view/217c0e01
  1. //获得字符串oString的实际长度
  2. public int StringLength ( string oString )
  3. {
  4.         byte[] strArray=System.Text .Encoding.Default .GetBytes ( oString );
  5.         int res=strArray.Length ;
  6.         return res;
  7. }

回复 "获得字符串的实际长度"

这儿你可以回复上面这条便签

captcha