NSString3 [iOS] Objective-C NSString -> char* ๊ณผ char* -> NSString // 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 nLengt.. 2021. 10. 21. [iOS] Objective-C NSString์ ๊ฐ์ null ์ฒดํฌํ๋ ๋ฐฉ๋ฒ NSString *nsStr = @"Hello World"; if ([nsStr isEqual: [NSNull null]]) printf("null"); else printf("not null"); https://stackoverflow.com/questions/19546920/how-to-check-nsstring-is-null-or-not how to Check NSString is null or not I want to check weather a NSString is null or not. Im assigning from an JSON array. After assigning that string value is . Now I want to check this string is null or no.. 2021. 10. 13. [iOS] Objective-C NSMutableDictionary ๋ฅผ json ํํ๋ก ๋ณํ iOS (Objective-C) ์์ JSON ํํ๋ก http ํต์ ์ ํ๊ธฐ ์ํด json ํํ๋ก ๋ณํ์ ํ๋ ์ฝ๋์ด๋ค. NSMutableDictionary ํํ์ ๋ฐ์ดํฐ๋ฅผ NSJSONSerialization ์ ์ด์ฉํด NSData ๋ก ๋ณํํ ํ, ๋ค์ NSString ์ผ๋ก ๋ณํํ๋ค. NSMutableDictionary *retDic = [[NSMutableDictionary alloc]init]; [retDic setValue:๊ฐ1 forKey:@"ํค1"]; [retDic setValue:๊ฐ2 forKey:@"ํค2"]; NSData *requestData = [NSJSONSerialization dataWithJSONObject:retDic options:0 error:nil]; NSString *req.. 2021. 10. 6. ์ด์ 1 ๋ค์