private int strlen(string arg_strSource)
{
int intStringLength = 0; //字串實際長度
if(arg_strSource.Length > 1)
{
System.Text.ASCIIEncoding objAscII = new System.Text.ASCIIEncoding();
byte[] ary_bteStringBuffer = objAscII.GetBytes(arg_strSource);
for (int i=0 ; i <= ary_bteStringBuffer.Length-1 ; i++)
{
if (ary_bteStringBuffer[i] == 63) //判斷是否為中文字或全型符號
{
intStringLength++;
}
intStringLength++;
}
}
return intStringLength;
}