//nsstring to unichar

    NSString *str1 = @"";

    unichar uniChar;

    [str1 getCharacters:&uniChar];

    NSLog(@"%zd",uniChar);

    

    //unichar to nsstring

    NSString *str2 = [NSString stringWithCharacters:&uniChar length:1];

    NSLog(@"결과: %@", str2);//r

'블로그 > 오브젝티브C' 카테고리의 다른 글

NSString to unicode(unichar), unichar to NSString  (0) 2014.12.26
비밀글