文件名称:Delphi_205670
-
所属分类:
- 标签属性:
- 上传时间:2014-06-28
-
文件大小:2.5kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Delphi在一段文字中分别统计中文字符和英文字符个数,程序智能判断是中文还是英文字符,并把各自的统计结果显示出来,主要是用一个for循环遍历字符串,逐一通过调用ord函数将所有字符转换为对应的数值,再通过Length来判断各个字节所对应的字符数值是否在33~126之间,从而区分出是英文或是中文,然后下一步就好操作了,直接过滤出大于127的为中文、33~126之间的为英文,并返回到窗体的控件上显示。
-Delphi in a text are the statistics the number of Chinese characters and English characters, intelligent judgment procedure is Chinese or English characters, and the respective statistical results show, primarily with a for loop through the string, one by one by calling the function ord all character is converted to the corresponding value, and then through each byte Length to determine whether the value in the corresponding characters between 33 and 126, thereby distinguishing between the Chinese or English, and the next operation of the like, direct filtration of greater than 127 for the Chinese, between 33 to 126 in English, and return to display the controls on the form.
-Delphi in a text are the statistics the number of Chinese characters and English characters, intelligent judgment procedure is Chinese or English characters, and the respective statistical results show, primarily with a for loop through the string, one by one by calling the function ord all character is converted to the corresponding value, and then through each byte Length to determine whether the value in the corresponding characters between 33 and 126, thereby distinguishing between the Chinese or English, and the next operation of the like, direct filtration of greater than 127 for the Chinese, between 33 to 126 in English, and return to display the controls on the form.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.