byte[] streamBuff = null;
streamBuff = System.Text.ASCIIEncoding.Default.GetBytes(strin) ;
int flen;
if(len>streamBuff.Length)
{
flen=len-streamBuff.Length;
strin=strin.PadRight(flen,' ');
return strin;
}
为什么汉字会加上空格,数字就加不上呢
138285394,101566701,有声邮 ,20050303,211031,234,4 ,0.40
"234" "4"我想加到4个字符这个函数有什么问题谢谢大虾们
streamBuff = System.Text.ASCIIEncoding.Default.GetBytes(strin) ;
int flen;
if(len>streamBuff.Length)
{
flen=len-streamBuff.Length;
strin=strin.PadRight(flen,' ');
return strin;
}
为什么汉字会加上空格,数字就加不上呢
138285394,101566701,有声邮 ,20050303,211031,234,4 ,0.40
"234" "4"我想加到4个字符这个函数有什么问题谢谢大虾们
System.Text.Encoding.Default.GetBytes("");