| 发表于:2007-07-06 16:45:126楼 得分:0 |
为什么不在str1这个string里判断,如果全是个位数,用indexof,不全是个位数的,用正则,如果要在数组里判断,这样 string str1 = "0,1,2,3,4,5,6 "; string[] str = str1.split( ', '); list <string> list = new list <string> (str); if (list.contains( "7 ")) response.write( "包含 "); else response.write( "不包含 "); | | |
|