Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put a non-breaking space in an NSString?

I would like to define an NSString, of length 1, whose only character is a non-breaking space. How should I do ?

like image 948
Colas Avatar asked Sep 23 '13 12:09

Colas


1 Answers

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";
like image 71
hamstergene Avatar answered Oct 31 '22 19:10

hamstergene