-
-
Save niw/c68db4e4e3b7f730dac90365181d28e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import Foundation; | |
int main() { | |
NSMutableString *s = [[NSMutableString alloc] initWithString:@"🐱"]; | |
[s replaceCharactersInRange:NSMakeRange(1, 1) withString:@"a"]; | |
NSLog(@"%@", [s dataUsingEncoding:NSUTF8StringEncoding]); // nil | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment