Skip to content
Ilho Ahn edited this page Nov 19, 2013 · 2 revisions

Summary

Make String be foramtted like phone number.

Personal Information

+ (NSString*) toPhoneNumberwithDash:(NSString *) value;

Number to phone format: 12345678 -> 1234-5678 .. etc. (Korean type)

Example)

   NSLog (@"formated :%@", [FormatUtil toPhoneNumberwithDash:@"022304444"];

Result)

  formated : 02-230-4444

+ (NSString*) cutAddress:(NSString *)addressStr limit:(NSInteger) limit;

Cut address to limit

Example)

   NSLog (@"cut address: %@", [FormatUtil cutAddress: @"Nakseongdae-dong Seoul South Korea" limit:2]);

Result)

   cut address: Nakseongdae-dong Seoul

+ (NSString )toCurrency:(NSNumber)number;

Make Currency Format 1000 -> 1,000

Example)

   [FormatUtil toCurrency:[NSNumber numberwithInteger:12000]];

Result)

   @"12,000"

Version

Version 0.0.1 Build 61 Release 1