Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
NSStringOOExtensions.h File Reference
import "OOCocoa.h"
+ Include dependency graph for NSStringOOExtensions.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

category  NSString(OOExtensions)
 
category  NSMutableString(OOExtensions)
 

Functions

NSString * OOTabString (NSUInteger count)
 

Function Documentation

◆ 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", // 5
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" // 10
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)
unsigned count