vb-将一串字符中所有中文剔出来
放置两个Text,一个ButtonPrivate Sub Command1_Click()
Dim a As String
For i = 1 To Len(Text1.Text)
a = Mid(Text1.Text, i, 1)
If Asc(a) > 0 Then
If a = Chr(10) Then
Text2.Text = Text2.Text + vbCrLf
End If
a = ""
Text2.Text = Text2.Text + a
Else
Text2.Text = Text2.Text + a
End If
Next
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub 原来是利用ASC码的顺序做文章了…… 那是。如果一个汉字一个汉字的判断那就等着死机吧
今天放出那个TMED GSC的时候因为汉化没法把字写全了从口袋吧整全中文汉化时突发奇想想出来的这个小东西 汉字asc传回小于零的值吗?[yct38] [yct38]
[[i] 本帖最后由 深红喷火龙 于 2008-9-11 13:22 编辑 [/i]] 汉字好像没有ASC II. 对,因此如果用ASCII判断汉字,只要表里没有就成 [quote]原帖由 [i]深红喷火龙[/i] 于 2008-9-11 13:21 发表 [url=http://usa.poketb.com/bbs/redirect.php?goto=findpost&pid=89688&ptid=5045][img]http://usa.poketb.com/bbs/images/common/back.gif[/img][/url]
汉字asc传回小于零的值吗?[yct38] [yct38] [/quote]
VB确实是这样的 没弄过汉字的,我以为都在256以后的说 不信试试Msgbox Asc("最")
页:
[1]