Adding some useful functions to ITFoundation, for dealing with Carbon
[ITFoundation.git] / ITCarbonSupport.m
diff --git a/ITCarbonSupport.m b/ITCarbonSupport.m
new file mode 100755 (executable)
index 0000000..ed6a35c
--- /dev/null
@@ -0,0 +1,9 @@
+#import "ITCarbonSupport.h"
+
+NSString *NSStringFromFourCharCode(FourCharCode code) {
+    return [NSString stringWithUTF8String:&code];
+}
+
+FourCharCode FourCharCodeFromNSString(NSString *string) {
+    return (*((unsigned long*)[string UTF8String]));
+}
\ No newline at end of file