writing 'TAB' character to a text file in objective-c?
What do I need to 开发者_StackOverflow中文版use to write out my TAB character?
Use the escape character \t
in a string literal to print a 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.
精彩评论