unicode - Objective-C and scanning an integer or character to a hex representation -


nsscanner has instance method -scanhexint: converting hexadecimal string representation of int int. i'd invert this: i'd method takes int , returns hexadecimal representation.

is there ready made method in docs?

[to more relevant, i'd take string comprising single kanji , return unicode point.]

if check documentation on string format specifiers, you'll see there several specifiers can use hexadecimal string representation of number. instance, use:

[nsstring stringwithformat:@"%x", foo] 

Comments