Skip to content

Instantly share code, notes, and snippets.

@dsci
Created November 14, 2011 19:27
Show Gist options
  • Save dsci/1364868 to your computer and use it in GitHub Desktop.
Save dsci/1364868 to your computer and use it in GitHub Desktop.
- (void) testNSStringFromChar
{
char * charCity = "Leipzig";
NSString *city = @"Leipzig";
NSString *cityFromChar = [NSString stringWithUTF8String:charCity];
STAssertEqualObjects(city,cityFromChar, @"cityfrom Char should be the same as city from NSString");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment