Skip to content

Commit

Permalink
the correct way to handle it
Browse files Browse the repository at this point in the history
  • Loading branch information
chady committed Feb 27, 2013
1 parent 7ea0b4e commit 59eebbc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Class/CKPhoneLib.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ -(NSDictionary *)extractPhoneComponents:(NSString *)number {
NSInteger pos = [self _countryCodePosition:normalized];
countryCode = [normalized substringToIndex:pos];
phoneNumber = [normalized substringFromIndex:pos];
while ([phoneNumber length] > 0 && [phoneNumber characterAtIndex:0] == '0') {
phoneNumber = [phoneNumber substringFromIndex:1];
}

}
while ([phoneNumber length] > 0 && [phoneNumber characterAtIndex:0] == '0') {
phoneNumber = [phoneNumber substringFromIndex:1];
}

}
Expand Down

0 comments on commit 59eebbc

Please sign in to comment.