]> git.saurik.com Git - cydia.git/commitdiff
Separate out CyteKit/NSString-Cyte.mm.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 1 Mar 2011 03:49:20 +0000 (19:49 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:31 +0000 (02:41 -0800)
CyteKit/NSString-Cyte.h
CyteKit/NSString-Cyte.mm [new file with mode: 0644]
MobileCydia.mm

index ae370c03a78691e06df786b27a25de4a1b050860..a5955c4d2aeee26f34b7a1914c3ef253e22753af 100644 (file)
@@ -40,6 +40,8 @@
 #ifndef CyteKit_NSString_Cydia_H
 #define CyteKit_NSString_Cydia_H
 
 #ifndef CyteKit_NSString_Cydia_H
 #define CyteKit_NSString_Cydia_H
 
+#include <Foundation/Foundation.h>
+
 @interface NSString (Cyte)
 + (NSString *) stringWithUTF8BytesNoCopy:(const char *)bytes length:(int)length;
 + (NSString *) stringWithUTF8Bytes:(const char *)bytes length:(int)length;
 @interface NSString (Cyte)
 + (NSString *) stringWithUTF8BytesNoCopy:(const char *)bytes length:(int)length;
 + (NSString *) stringWithUTF8Bytes:(const char *)bytes length:(int)length;
diff --git a/CyteKit/NSString-Cyte.mm b/CyteKit/NSString-Cyte.mm
new file mode 100644 (file)
index 0000000..6ab4c86
--- /dev/null
@@ -0,0 +1,52 @@
+/* Cydia - iPhone UIKit Front-End for Debian APT
+ * Copyright (C) 2008-2011  Jay Freeman (saurik)
+*/
+
+/* Modified BSD License {{{ */
+/*
+ *        Redistribution and use in source and binary
+ * forms, with or without modification, are permitted
+ * provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the
+ *    above copyright notice, this list of conditions
+ *    and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the
+ *    above copyright notice, this list of conditions
+ *    and the following disclaimer in the documentation
+ *    and/or other materials provided with the
+ *    distribution.
+ * 3. The name of the author may not be used to endorse
+ *    or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/* }}} */
+
+#include "CyteKit/NSString-Cyte.h"
+
+@implementation NSString (Cyte)
+
++ (NSString *) stringWithUTF8BytesNoCopy:(const char *)bytes length:(int)length {
+    return [[[NSString alloc] initWithBytesNoCopy:const_cast<char *>(bytes) length:length encoding:NSUTF8StringEncoding freeWhenDone:NO] autorelease];
+}
+
++ (NSString *) stringWithUTF8Bytes:(const char *)bytes length:(int)length {
+    return [[[NSString alloc] initWithBytes:bytes length:length encoding:NSUTF8StringEncoding] autorelease];
+}
+
+@end
index 26c7920feecddb792f7df7ef1cea3c7a085df06d..d1568d72290c9647f33be7b9f97ebb719a013770 100644 (file)
@@ -624,18 +624,6 @@ NSUInteger DOMNodeList$countByEnumeratingWithState$objects$count$(DOMNodeList *s
 - (NSString *) stringByAddingPercentEscapesIncludingReserved;
 @end
 
 - (NSString *) stringByAddingPercentEscapesIncludingReserved;
 @end
 
-@implementation NSString (UICaboodle)
-
-+ (NSString *) stringWithUTF8BytesNoCopy:(const char *)bytes length:(int)length {
-    return [[[NSString alloc] initWithBytesNoCopy:const_cast<char *>(bytes) length:length encoding:NSUTF8StringEncoding freeWhenDone:NO] autorelease];
-}
-
-+ (NSString *) stringWithUTF8Bytes:(const char *)bytes length:(int)length {
-    return [[[NSString alloc] initWithBytes:bytes length:length encoding:NSUTF8StringEncoding] autorelease];
-}
-
-@end
-
 @implementation NSString (Cydia)
 
 - (NSComparisonResult) compareByPath:(NSString *)other {
 @implementation NSString (Cydia)
 
 - (NSComparisonResult) compareByPath:(NSString *)other {