查看单个帖子
旧 2009-04-26, 05:45 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 判断字符串中字母

判断字符串中字母
www.dimcax.com
判断字符串中字母
(defun judge (string / i table len stratom str-ascii)
(setq i 0
table '()
len (strlen string)
)
(while (< i len)
(setq str-ascii (vl-string-elt string i))
(if (or
(and (>= str-ascii 6) (<= str-ascii 90))
(and (>= str-ascii 97) (<= str-ascii 122))
)
(progn
(setq ascii-str (chr str-ascii))
(setq table (cons ascii-str table))
)
)
(setq i (1+ i))
)
(setq table (reverse table))
table
)
判读输入的字符串中的字母,并将这些字母依次添加到表table中,返回该表
progress every day!!!
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)