Reputation: 3573
I would like to define an NSString
, of length 1, whose only character is a non-breaking space. How should I do ?
Upvotes: 8
Views: 1739
Reputation: 24439
Use universal character names:
// http://en.wikipedia.org/wiki/Non-breaking_space
NSString* const nonBreakingSpace = @"\u00A0";
// small-u takes four digits, big-u takes eight
// NSString* const nonBreakingSpace = @"\U000000A0";
Upvotes: 15