Writing the "TAB" character to a text file in objective-c?

What do I need to use to write my TAB character?

+6
objective-c iphone ipad
source share
1 answer

Use the \t escape character in the string literal to print the tab:

 NSString *string = @"This is a tab:\tThis is tabbed!\n"; 

You can put \t in any string literal and do with it what you want from there: write it to a file, to STDOUT , whatever.

+23
source share

All Articles