脚本--Groovy 遍历字符串(62)

来源:互联网 发布:畅捷通软件下载 编辑:程序博客网 时间:2024/05/20 06:30
def chineseWithBlackSpace=""for(c in userOrderNo){    if(('0' <= c ) && ('9' >= c)){        chineseWithBlackSpace +=c    }else{        chineseWithBlackSpace += " "+c    }}println chineseWithBlackSpaceexecution.setVariable("chineseWithBlackSpace", chineseWithBlackSpace);
0 0
原创粉丝点击