Android判断字符串是否包含指定字符 TateL 2023-11-09 99 阅读1分钟 String str="zhidao"; if(str.indexOf("a")==-1){ //等于-1表示这个字符串中没有a这个字符 //do something }else{ //do something }