session-ios/Signal/src/util/PhoneNumberUtil.h
Craig Gidney 03ce3635cb Improved the phone number editing during registration
- Fixed a crash where an offset wrapped around when deleting the opening bracket
- Backspacing now skips over formatting characters
- Cursor position is maintained more accurately when reformatting
- Added a few utility methods
- Also fixed a test not having "test" as a prefix, causing it not to run
//FREEBIE
2014-09-02 18:11:11 +02:00

16 lines
566 B
Objective-C

#import <Foundation/Foundation.h>
#import "PhoneNumber.h"
@interface PhoneNumberUtil : NSObject
+ (NSString *)callingCodeFromCountryCode:(NSString *)code;
+ (NSString *)countryNameFromCountryCode:(NSString *)code;
+ (NSArray *)countryCodesForSearchTerm:(NSString *)searchTerm;
+ (NSString*) normalizePhoneNumber:(NSString *) number;
+(NSUInteger) translateCursorPosition:(NSUInteger)offset
from:(NSString*)source
to:(NSString*)target
stickingRightward:(bool)preferHigh;
@end