Permalink
Browse files

cleanPhone fix ("00" for international prefix and javascript country …

…prefix cleanup)
  • Loading branch information...
1 parent 0ea7b58 commit d5009b38a404629f15c8de71f6a546baf59d6dbb Filipe Pina committed Mar 15, 2012
Showing with 16 additions and 3 deletions.
  1. +4 −0 .gitignore
  2. +4 −0 wifiSMS/Classes/MyHTTPConnection.m
  3. +8 −3 wifiSMS/Web/func.js
View
@@ -0,0 +1,4 @@
+build
+temp
+.DS_Store
+DerivedData
@@ -892,6 +892,10 @@ -(NSString *)LoadFullAddressBook:(NSString *)CC {
phoneNoFormat = [[mobile componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""];
+ if ([phoneNoFormat hasPrefix:@"00"]){
+ phoneNoFormat = [phoneNoFormat substringFromIndex:2];
+ }
+
if ([phoneNoFormat hasPrefix:@"0"]){
phoneNoFormat = [phoneNoFormat substringFromIndex:1];
}
View
Oops, something went wrong.

0 comments on commit d5009b3

Please sign in to comment.