判断以xx开头的字符串
作者:互联网
public static void main(String[] args) { String str = "EAN_13,1534651"; String strHttp = "http://weixing.qq.com"; System.out.println(str.startsWith("EAN")); System.out.println(strHttp.startsWith("http")); }
结果:
public static void main(String[] args) { String str = "EAN_13,1534651"; String strHttp = "htp://weixing.qq.com"; System.out.println(str.startsWith("EAN")); System.out.println(strHttp.startsWith("http")); }
标签:startsWith,strHttp,String,EAN,System,xx,开头,字符串,out 来源: https://www.cnblogs.com/shifu8005/p/10430076.html