What is the escape sequence for "" (space) in the iPhone SDK?

In my iPhone app, I have ASCII art that has many spaces between two characters.

Therefore, I need to add an escape sequence for the space instead of each space.

What is Escape Sequence for space in the iPhone SDK?

+3
source share
1 answer

You can use non-breaking spaces (or other Unicode characters ):

NSString* body = @"t   \n e  \n  s \n   t\n";
body = [body stringByReplacingOccurrencesOfString:@" " withString:@"\u00A0"]; 
picker.body = body;
+9
source

Source: https://habr.com/ru/post/1783826/


All Articles