1 #import "ITCategory-NSString.h"
3 @implementation NSString (ITFoundationCategory)
5 + (id)stringWithFourCharCode:(unsigned long)fourCharCode {
6 return [[[self alloc] initWithFourCharCode:fourCharCode] autorelease];
9 - (id)initWithFourCharCode:(unsigned long)fourCharCode {
10 return [self initWithFormat:@"%.4s", &fourCharCode];
13 - (unsigned long)fourCharCode {
14 const unsigned char *c_s = [self UTF8String];
15 unsigned long tmp = *c_s++;