Android 格式化字符串电话号码
我目前正在导出存储在contacts内容提供商中的一些联系人的电话号码,我想知道是否存在获取电话号码的“格式化”字符串的内容,例如,代替xxx xxx xxxx=>xxxxxxxxxxxxx。为了获得更好的数据库一致性 这将是相当容易与注册ex,但我想知道,如果已经存在一些为此目的,作为医生。提到:Android 格式化字符串电话号码,android,string,format,contactscontract,phone-number,Android,String,Format,Contactscontract,Phone Number,我目前正在导出存储在contacts内容提供商中的一些联系人的电话号码,我想知道是否存在获取电话号码的“格式化”字符串的内容,例如,代替xxx xxx xxxx=>xxxxxxxxxxxxx。为了获得更好的数据库一致性 这将是相当容易与注册ex,但我想知道,如果已经存在一些为此目的,作为医生。提到: public static final String NUMBER - Since: API Level 5 The phone number as the user **entered it**.
public static final String NUMBER - Since: API Level 5
The phone number as the user **entered it**.
Type: TEXT - Constant Value: "number"
让我想一个标准格式存在于某处?
提前谢谢 据我所知,这样的事情是不存在的。我想你得自己写了。Reg ex it!非常确定没有类似的存在。如果您不想使用Reg ex代码,请使用下面的代码来获取此类型的格式化数字
String[] temp=SelectedContactNo.split("-");
String MoNo="";
int len=temp.length;
for(int j=0;j<len;j++)
{
MoNo +=temp[j];
}
现在,您将使用MoNo作为格式化字符串。哇,真的不知道有人吗?我想我很喜欢正则表达式。。。