字符串中,中文/英文/数字字符的自动识别(50分)

  • 主题发起人 主题发起人 wtang
  • 开始时间 开始时间
W

wtang

Unregistered / Unconfirmed
GUEST, unregistred user!
For example :'122229,南京东路,Hello ,world'
this sentence is read in one string,but how can I recognize which is Chinese code or
English code,and so on.

Thank you firstly.
 
It's very easy.You can use ascii(string).
step1:read this string char by char
step2:judge it(0-9 in ascii is 48-57)
a-Z(69 ... I forget,you can test it)
The ascii of chinese char is bigger than 120.
step:do your things

Most of above is correct.
Good Luck!
 
看这里的回答:
http://www.delphibbs.com/delphibbs/DispQ.asp?LID=398586
 
多人接受答案了。
 

Similar threads

I
回复
0
查看
711
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
491
import
I
后退
顶部