27 #pragma mark Class Constants
37 #define SCStringsClass @"SCStrings"
76 BOOL fCaseInsensitive;
77 id<SCTextDelegate> fDelegate;
81 #pragma mark Instance Properties
91 @property (nonatomic, readwrite, retain) NSString *name;
97 @property (nonatomic, readonly, assign)
SCIndex count;
103 @property (nonatomic, readwrite, assign) BOOL readOnly;
109 @property (nonatomic, readonly, assign) BOOL empty;
115 @property (nonatomic, readonly, assign) BOOL modified;
121 @property (nonatomic, readwrite, assign) BOOL caseInsensitive;
127 @property (nonatomic, readwrite, retain) id<SCTextDelegate> delegate;
148 @property (nonatomic, readonly, assign) NSEnumerator *stringEnumerator;
154 @property (nonatomic, readonly, assign) NSEnumerator *reverseStringEnumerator;
165 @property (nonatomic, readonly, assign)
SCArray *array;
171 @property (nonatomic, readonly, retain) NSArray *foundationArray;
186 @property (nonatomic, readonly, assign)
SCStrings *ascendingSortedStrings;
192 @property (nonatomic, readonly, assign)
SCStrings *descendingSortedStrings;
201 @property (nonatomic, readonly, assign)
SCStrings *sortedStrings;
220 @property (nonatomic, readonly, assign)
SCStrings *reversedStrings;
231 @property (nonatomic, readonly, assign) NSString *firstString;
237 @property (nonatomic, readonly, assign) NSString *lastString;
248 @property (nonatomic, readonly, assign)
SCIndex indexOfLastString;
253 #pragma mark Creating Strings Lists
254 + (instancetype)stringsWithCoder:(NSCoder *)coder;
255 + (instancetype)stringsWithContentsOfSerializedFile:(NSString *)path;
256 + (instancetype)stringsWithDataDictionary:(NSDictionary *)dictionary;
257 + (instancetype)stringsWithDataDictionaryFromFile:(NSString *)path;
258 + (instancetype)stringsWithStream:(
SCStream *)stream;
259 + (instancetype)stringsWithFileStream:(NSString *)path;
261 + (instancetype)stringsWithName:(NSString *)name;
262 + (instancetype)stringsWithString:(NSString *)string;
263 + (instancetype)stringsWithCollection:(
id<
SCCollection>)collection;
264 + (instancetype)stringsWithStrings:(
SCStrings *)strings;
265 + (instancetype)strings;
268 #pragma mark Initializing Strings Lists
269 - (instancetype)initWithName:(NSString *)name;
270 - (instancetype)initWithString:(NSString *)string;
271 - (instancetype)initWithCollection:(
id<
SCCollection>)collection;
272 - (instancetype)initWithStrings:(
SCStrings *)strings;
273 - (instancetype)init;
276 #pragma mark Copying Strings Lists
279 - (void)setString:(NSString *)string;
282 #pragma mark Comparing Strings Lists
283 - (BOOL)isEqualToStrings:(
SCStrings *)strings;
284 - (BOOL)isEqualToCollection:(
id<
SCCollection>)collection;
285 - (BOOL)isEqualTo:(
id)object;
286 - (BOOL)isEqual:(
id)object;
289 #pragma mark Strings Enumerators
292 - (void)reverseEnumerateWithDelegate:(
id<
SCTextDelegate>)delegate;
293 - (void)reverseEnumerate;
296 #pragma mark Sorting Strings Lists
297 - (void)sortAscendingWithSorter:(
id<
SCSorter>)sorter;
298 - (void)sortDescendingWithSorter:(
id<
SCSorter>)sorter;
299 - (void)sortWithSorter:(
id<
SCSorter>)sorter;
300 - (void)sortAscending;
301 - (void)sortDescending;
308 #pragma mark Adding Strings
309 - (void)addString:(NSString *)string;
314 - (void)insertString:(NSString *)string atIndex:(
SCIndex)index;
317 - (void)insertStrings:(
SCStrings *)strings atIndexes:(NSIndexSet *)indexes;
318 - (void)insertCollection:(
id<
SCCollection>)collection atIndexes:(NSIndexSet *)indexes;
319 - (void)insertLineAtIndex:(
SCIndex)index;
322 #pragma mark Removing Strings
323 - (void)removeAllStrings;
324 - (void)removeFirstString;
325 - (void)removeLastString;
326 - (void)removeStringAtIndex:(
SCIndex)index;
327 - (void)removeStringsAtIndexes:(NSIndexSet *)indexes;
328 - (void)removeString:(NSString *)string;
329 - (void)removeStrings:(
SCStrings *)strings;
331 - (void)removeStringsWithSubstring:(NSString *)substring;
332 - (void)removeStringsNotAtIndexes:(NSIndexSet *)indexes;
333 - (void)removeStringsNotEqualTo:(NSString *)string;
334 - (void)removeStringsNotInStrings:(
SCStrings *)strings;
335 - (void)removeStringsNotInCollection:(
id<
SCCollection>)collection;
336 - (void)removeStringsWithoutSubstring:(NSString *)substring;
337 - (void)removeDuplicatedStrings;
340 #pragma mark Replacing Strings
341 - (void)replaceStringAtIndex:(
SCIndex)index withString:(NSString *)string;
342 - (void)replaceStringsAtIndexes:(NSIndexSet *)indexes withStrings:(
SCStrings *)strings;
343 - (void)replaceStringsAtIndexes:(NSIndexSet *)indexes withCollection:(
id<
SCCollection>)collection;
344 - (void)replaceString:(NSString *)string withString:(NSString *)newString;
347 #pragma mark Copying and Moving Strings
348 - (void)exchangeStringAtIndex:(
SCIndex)index withStringAtIndex:(
SCIndex)destination;
349 - (void)duplicateStringAtIndex:(
SCIndex)index;
350 - (void)duplicateAllStrings;
352 - (void)copyStringAtIndex:(
SCIndex)index toIndex:(
SCIndex)destination;
353 - (void)moveStringAtIndex:(
SCIndex)index toIndex:(
SCIndex)destination;
354 - (void)forwardMoveStringAtIndex:(
SCIndex)index steps:(
SCIndex)steps;
355 - (void)forwardMoveStringAtIndex:(
SCIndex)index;
356 - (void)backwardMoveStringAtIndex:(
SCIndex)index steps:(
SCIndex)steps;
357 - (void)backwardMoveStringAtIndex:(
SCIndex)index;
358 - (void)moveToFirstPositionStringAtIndex:(
SCIndex)index;
359 - (void)moveToLastPositionStringAtIndex:(
SCIndex)index;
363 #pragma mark Querying a Strings List
364 - (NSString *)stringAtIndex:(
SCIndex)index;
365 - (
SCStrings *)stringsAtIndexes:(NSIndexSet *)indexes;
368 #pragma mark Finding Strings in a Strings List
369 - (BOOL)containsString:(NSString *)string;
370 - (BOOL)containsStrings:(
SCStrings *)strings;
371 - (BOOL)containsCollection:(
id<
SCCollection>)collection;
372 - (BOOL)containsAnyString:(
SCStrings *)strings;
373 - (BOOL)containsAnyStringFromCollection:(
id<
SCCollection>)collection;
374 - (BOOL)containsSubstring:(NSString *)substring;
375 - (BOOL)containsSubstrings:(
SCStrings *)substrings;
376 - (BOOL)containsSubstringsFromCollection:(
id<
SCCollection>)collection;
377 - (BOOL)containsAnySubstring:(
SCStrings *)substrings;
378 - (BOOL)containsAnySubstringFromCollection:(
id<
SCCollection>)collection;
379 - (BOOL)containsDuplicatedStrings;
381 - (
SCIndex)indexOfString:(NSString *)string;
382 - (
SCIndex)indexOfSubstring:(NSString *)substring;
384 - (
SCStrings *)stringsWithSubstring:(NSString *)substring;
389 - (
SCStrings *)stringsWithoutSubstring:(NSString *)substring;
393 - (
SCULong)countOfString:(NSString *)string;
394 - (
SCULong)countOfSubstring:(NSString *)substring;
395 - (
SCULong)countOfStringsWithSubstring:(NSString *)substring;
uint64_t SCULong
Definition: SCTypes.h:82
Protocol and class SCTextDelegate header file.
Class SCObject header file.
Strings list class.
Definition: SCStrings.h:73
Parent class of all library classes.
Definition: SCObject.h:58
Class SCArray header file.
Abstract implementation of the protocol SCSorter.
Definition: SCSorter.h:136
Text object event handlers class.
Definition: SCTextDelegate.h:715
Abstract collections class.
Definition: SCCollection.h:101
Array class.
Definition: SCArray.h:81
NSUInteger SCIndex
Definition: SCCollectionProtocols.h:50
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:226