ascii长度?? [英] ascii length??
本文介绍了ascii长度??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想知道如何在VB.NET中获取字符串的ascii lengh?
特别是字符串包括alpha数字以及中文
(双字节)字符。假设我有一个字符串¢?¢D123使用前2个
字符为双字节,在该字符串上使用Len()将返回5.
如何获得7的值而不是?是否有任何VB.NET功能可以实现这一目标?
非常感谢你的帮助,非常感谢。
hi all,
I am wondering how I can get the ascii lengh of a string in VB.NET?
Especially that the string consists of alpha numerics as well as chinese
(double-byte) characters. Say I have a string "¢?¢D123" with the first 2
characters being double-byte, using Len() on that string would return me 5.
How can I get a value of 7 instead?? is there any VB.NET function that''d
achieve that?
Thanks a lot and your help''s greatly appreciated.
推荐答案
只是一个想法没有尝试过这个
你是否尝试将字符串转换为char数组并取长度
那个(如果双字节字符数为2个ascii字符可能有效)
希望它有帮助
eric
" Algren" <共********** @ yahoo.com.NO_SPAM>在消息中写道
news:e0 **************** @ tk2msftngp13.phx.gbl ...
just a thought haven''t tried this
did you try to convert the string to a char array and take the length of
that (if the double-byte chars count as 2 ascii chars that might work)
hope it helps
eric
"Algren" <co**********@yahoo.com.NO_SPAM> wrote in message
news:e0****************@tk2msftngp13.phx.gbl...
大家好,
我想知道如何在VB.NET中获取字符串的ascii lengh?
特别是字符串由alpha数字和中文组成
(双字节) )人物。假设我有一个字符串¢?¢D123前两个字符是双字节,在该字符串上使用Len()将返回
5.如何获得值7而不是?是否有任何VB.NET功能可以实现这一目标?
非常感谢您的帮助,我们非常感谢。
hi all,
I am wondering how I can get the ascii lengh of a string in VB.NET?
Especially that the string consists of alpha numerics as well as chinese
(double-byte) characters. Say I have a string "¢?¢D123" with the first 2
characters being double-byte, using Len() on that string would return me 5. How can I get a value of 7 instead?? is there any VB.NET function that''d
achieve that?
Thanks a lot and your help''s greatly appreciated.
嗨Algren,
Ascii字符串(我将在Armin之前),你的意思是7位数量
出现在字符串中?
Normaly字符串在使用的unicode中返回char的长度。 (我确实不会认为与其他类型的中文不同)。
我从未听说过混合字符串,其中包含不同类型的unicode
it。
但只是我的想法,
Cor
Hi Algren,
Ascii string (I will be before Armin), do you mean the amount of 7 bits
occurences in the string?
Normaly a string gives back the lenght of char in the used unicode. (I do
not think that is different with Chinese with other types).
I never heard of a mixed up string which has different types of unicode in
it.
But just my thoughts,
Cor
我想知道如何在VB.NET中获取字符串的ascii lengh?
特别是字符串由字母数字和中文组成
(双(字节)字符。假设我有一个字符串¢?¢D123前两个字符是双字节,在该字符串上使用Len()将返回
5.如何获得值7而不是?有什么VB.NET功能可以实现吗?
I am wondering how I can get the ascii lengh of a string in VB.NET?
Especially that the string consists of alpha numerics as well as chinese
(double-byte) characters. Say I have a string "¢?¢D123" with the first 2
characters being double-byte, using Len() on that string would return me 5. How can I get a value of 7 instead?? is there any VB.NET function that''d
achieve that?
hi Eric,
我试过了,它仍然给出了相同的结果。
谢谢
" EricJ" < ER ******** @ ThiSbitconsult.be.RE> | b?l¥ó
新闻:40 ********************* @news.skynet.be¤¤??? g ...
hi Eric,
I tried that and it still gave the same result.
Thanks
"EricJ" <er********@ThiSbitconsult.be.RE> |b?l¥ó
news:40*********************@news.skynet.be ¤¤???g...
只是一个想法没有尝试过这个
你是否尝试将字符串转换为char数组并取长度
(如果是字节字符数为2个ascii字符,可能有效)
希望它有帮助
eric
Algren <共********** @ yahoo.com.NO_SPAM>在消息中写道
新闻:e0 **************** @ tk2msftngp13.phx.gbl ...
just a thought haven''t tried this
did you try to convert the string to a char array and take the length of
that (if the double-byte chars count as 2 ascii chars that might work)
hope it helps
eric
"Algren" <co**********@yahoo.com.NO_SPAM> wrote in message
news:e0****************@tk2msftngp13.phx.gbl...
大家好,
我想知道如何在VB.NET中获取字符串的ascii lengh?
特别是字符串由alpha数字和中文
(双字节)字符组成。假设我有一个字符串¢?¢D123第一个
2个字符是双字节,在该字符串上使用Len()会返回我
hi all,
I am wondering how I can get the ascii lengh of a string in VB.NET?
Especially that the string consists of alpha numerics as well as chinese
(double-byte) characters. Say I have a string "¢?¢D123" with the first 2 characters being double-byte, using Len() on that string would return me
5.
5.
如何获得值7代替??是否有任何VB.NET功能可以实现这一目标?
非常感谢您的帮助,我们非常感谢。
How can I get a value of 7 instead?? is there any VB.NET function that''d
achieve that?
Thanks a lot and your help''s greatly appreciated.
这篇关于ascii长度??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文