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"));
	}

  结果:

判断以xx开头的字符串

	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"));

	}

  判断以xx开头的字符串

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-11-25
相关资源
相似解决方案