Skip to content

Commit

Permalink
cleanPhone fix ("00" for international prefix and javascript country …
Browse files Browse the repository at this point in the history
…prefix cleanup)
  • Loading branch information
Filipe Pina committed Mar 15, 2012
1 parent 0ea7b58 commit d5009b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
build
temp
.DS_Store
DerivedData
4 changes: 4 additions & 0 deletions wifiSMS/Classes/MyHTTPConnection.m
Expand Up @@ -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];
}
Expand Down
11 changes: 8 additions & 3 deletions wifiSMS/Web/func.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d5009b3

Please sign in to comment.