프로그래밍/iOS
[iOS] NSString to Integer & Integer to NSString
김잉장
2016. 11. 30. 14:59
개요
- 문자를 숫자로, 숫자를 문자로 변환하는 방법에 대해 알아보자.
NSString to Integer
NSString* res = @"2048";
int count = [res intValue];
Integer to NSString
int count = 2048;
NSString *countString = [NSString stringWithFormat:@"%d", count];