Go to the source code of this file.
◆ OOTabString()
NSString * OOTabString |
( |
NSUInteger | count | ) |
|
Definition at line 218 of file NSStringOOExtensions.m.
219{
220 NSString * const staticTabs[] =
221 {
222 @"",
223 @"\t",
224 @"\t\t",
225 @"\t\t\t",
226 @"\t\t\t\t",
227 @"\t\t\t\t\t",
228 @"\t\t\t\t\t\t",
229 @"\t\t\t\t\t\t\t",
230 @"\t\t\t\t\t\t\t\t",
231 @"\t\t\t\t\t\t\t\t\t",
232 @"\t\t\t\t\t\t\t\t\t\t"
233 };
234 enum { kStaticTabCount = sizeof staticTabs / sizeof *staticTabs };
235
236 if (
count < kStaticTabCount)
237 {
238 return staticTabs[
count];
239 }
240 else
241 {
242 return [staticTabs[kStaticTabCount - 1] stringByAppendingString:
OOTabString(
count - (kStaticTabCount - 1))];
243 }
244}
NSString * OOTabString(NSUInteger count)