| name | language | licence |
|---|---|---|
| Force Application Crash | Objective-C | Other |
| 64-bit Number from a String | Perl | Other |
| FourCharCode to NSString | Objective-C | Other |
| Printing Binary Representation of String | C | Other |
| ROT13 | Objective-C | Other |
| NSIndexSet to String | Objective-C | Other |
| getBoundingClientRect from WebKit using JavaScriptCore | Objective-C | Other |
| NSImage Create QuickLook icon for URL | Objective-C | Other |
< 1 2 3 4 >
language: Objective-C
licence: Other
ROT13
options: view full snippet • send to code collector
// The magic and power of ROT13 encryption, now available via Cocoa!!!
@interface NSString (NSString_Additions)
-(NSString *) rot13String;
@end
@implementation NSString (NSString_Additions)
-(NSString *) rot13String
{
const char *_string = [self cStringUsingEncoding:NSASCIIStringEncoding];
int stringLength = [self length];
char newString[stringLength+1];
int x;
for( x=0; x<stringLength; x++ )
{



library
objective-c (22)