标签:
// 在字符串中删除指定字符串。
String phoneNum="1795112345";
phoneNum = phoneNum.replace("17951", "");
System.out.println(phoneNum);
//判断指定字符串是否包含另一字符串
String phoneNum="1795112345";
String IpNum="17951";
return phoneNum.contains(IpNum);
String的两个API,判断指定字符串是否包含另一字符串,在字符串中删除指定字符串。
标签:
原文地址:http://www.cnblogs.com/childhooding/p/4334148.html