检测字符串内容的常用方法

str.startsWith(http);  //字符串是否http开头   

str.endsWith(png);    //字符串是否png结尾  

str.repeat(次数);     //重复字符串 

猜你喜欢

转载自blog.csdn.net/weixin_40802058/article/details/89196669