728x90
// char* -> NSString
char szText[] = "hello World";
NSString* nsStr = [NSString stringWithUTF8String: szText];
// NSString -> char*
NSString* nsStr = @"hello World";
char* strTmp = (char*)[nsStr UTF8String];
// NSString -> unsigend char*
NSString* nsStr = @"hello World";
unsigned char* strTmp = (unsigned char*)[nsStr UTF8String];
// NSString ๊ธธ์ด ๊ตฌํ๊ธฐ
NSString* nsStr2 = @"check length!";
int nLength = [nsStr2 length];
23๋ 5์ 11์ผ ์ถ๊ฐ
NSString ์ ์ธ์ฝ๋ฉ์ ์ ํํด์ผ ํ๋ฉฐ, ํด๋น ๋ฐ์ดํฐ๋ก๋ถํฐ ๋์ฝ๋ฉ์ด ์คํจํ๋ ๊ฒฝ์ฐ๋ฅผ ๋๋นํ์ฌ ์ต์ ๋ ํ์ ์ ๋ฆฌํดํ๋ค.
'๐ ๊ฐ๋ฐ > iOS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[iOS] Xcode Build (0) | 2021.10.21 |
---|---|
[iOS] WebView ์์ ๋๋ฒ๊น ํ๋ ๋ฐฉ๋ฒ (Safari - ๊ฐ๋ฐ์์ฉ ํด ์ฌ์ฉ) (0) | 2021.10.21 |
[iOS] Objective-C NSString์ ๊ฐ์ null ์ฒดํฌํ๋ ๋ฐฉ๋ฒ (0) | 2021.10.13 |
[iOS] Objective-C NSMutableDictionary ๋ฅผ json ํํ๋ก ๋ณํ (0) | 2021.10.06 |
[iOS] A build only device cannot be used to run this target. (0) | 2021.09.23 |
๋๊ธ