java判断字符串以什么结尾

 

if (str.startsWith("222")){

}

 

if(str.endsWith("222")){

}

posted @ 2021-11-28 09:02  northli  阅读(524)  评论(0)    收藏  举报