java判断字符串以什么结尾

 

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

}

 

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

}

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