session-ios/Signal/src/util/PhoneNumberUtil.h
Dirk-Willem van Gulik a1d0b6b1ad Lets user select country by country code.
Allow the entry of the country dial code to also pre-select/filter
the list of options. Useful for countries way down the list, or
countries that tend to be spelled in widely different ways.

Closes #662
2015-03-21 16:33:23 +01:00

23 lines
752 B
Objective-C

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