DATA: alpha_num(120) TYPE c.
alpha_num = ' abcdefghijklopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,./;''[]\-=`<>?:".
IF input CA alpha_num.
output = '不仅仅全是汉字'.
ELSE.
output = '全是汉字'.
ENDIF.
IF NOT input CO alpha_num.
output = '含有汉字'.
ELSE.
output = '不含有任何汉字'.
ENDIF.
提取汉字
data len type i.
data n type i.
len = strlen( input ).
do len times.
n = sy-index - 1.
if not alpha_num cs input+n(1).
concatenate output input+n(1) into output.
endif.
enddo.
阅读(6196) | 评论(0) | 转发(0) |