using System;
using System.Text;
namespace PubClass.CSharp.String
{
public class UTP8String
{
public long Length(string strLen)
{
bool winnt_chinese=true;
winnt_chinese=("中国".Length ==2,',',');
if(winnt_chinese)
{
long l,t,c;
int i;
l=strLen.Length ;
t=l;
for( i=0;i {
c=(int)strLen[i];
if( c<0)
{
c=c+65536;
}
if (c>255)
{
t=t+1;
}
}
return t;
}
else
{
return strLen.Length ;
}
}
}
}
using System.Text;
namespace PubClass.CSharp.String
{
public class UTP8String
{
public long Length(string strLen)
{
bool winnt_chinese=true;
winnt_chinese=("中国".Length ==2,',',');
if(winnt_chinese)
{
long l,t,c;
int i;
l=strLen.Length ;
t=l;
for( i=0;i
c=(int)strLen[i];
if( c<0)
{
c=c+65536;
}
if (c>255)
{
t=t+1;
}
}
return t;
}
else
{
return strLen.Length ;
}
}
}
}
关键字词: