|
Samond Classes Library 1.1.6-RELEASE build 132
|
00001 // 00002 // SCText.h 00003 // scl 00004 // 00005 // Created by Viacheslav Smolensky on 06.02.13. 00006 // Copyright (c) 2007 - 2014 by Samond Development Corporation. All rights reserved. 00007 // 00008 00016 #import <scl/SCStrings.h> 00017 #import <scl/SCTextIndex.h> 00018 00019 #define SCTextClass @"SCText" ///< SCText class name 00020 00027 @interface SCText : SCStrings { 00028 00029 } 00030 00031 #pragma mark - 00032 #pragma mark Creating Text 00033 00039 + (SCText *)textWithDataDictionary:(NSDictionary *)dictionary; 00040 00046 + (SCText *)textWithDataDictionaryFromFile:(NSString *)path; 00047 00053 + (SCText *)textWithCoder:(NSCoder *)coder; 00054 00060 + (SCText *)textWithContentsOfSerializedFile:(NSString *)path; 00061 00069 + (SCText *)textWithStream:(SCStream *)stream; 00070 00078 + (SCText *)textWithFileStream:(NSString *)path; 00079 00087 + (SCText *)textWithName:(NSString *)name 00088 capacity:(SCULong)capacity 00089 delegate:(id<SCTextDelegate>)delegate; 00090 00097 + (SCText *)textWithName:(NSString *)name capacity:(SCULong)capacity; 00098 00105 + (SCText *)textWithName:(NSString *)name delegate:(id<SCTextDelegate>)delegate; 00106 00112 + (SCText *)textWithName:(NSString *)name; 00113 00119 + (SCText *)textWithDelegate:(id<SCTextDelegate>)delegate; 00120 00126 + (SCText *)textWithCapacity:(SCULong)capacity; 00127 00132 + (SCText *)text; 00133 00140 + (SCText *)textWithString:(NSString *)string; 00141 00149 + (SCText *)textWithStrings:(NSString *)string, ...; 00150 00157 + (SCText *)textWithCollection:(id)collection; 00158 00165 + (SCText *)textWithList:(SCStrings *)list; 00166 00173 + (SCText *)textWithText:(SCText *)text; 00174 00175 #pragma mark - 00176 #pragma mark Initializing Text 00177 00184 - (id)initWithText:(SCText *)text; 00185 00186 #pragma mark - 00187 #pragma mark Setting and Copying Texts 00188 00194 - (void)copyFromText:(SCText *)text; 00195 00196 #pragma mark - 00197 #pragma mark Comparing Text 00198 00210 - (BOOL)isEqualToText:(SCText *)text caseInsensitive:(BOOL)value; 00211 00221 - (BOOL)isEqualToText:(SCText *)text; 00222 00234 - (BOOL)isEqualToContentsOfText:(SCText *)text caseInsensitive:(BOOL)value; 00235 00245 - (BOOL)isEqualToContentsOfText:(SCText *)text; 00246 00247 #pragma mark - 00248 #pragma mark Converting Text 00249 00254 - (SCStrings *)list; 00255 00260 - (SCStrings *)strings; 00261 00262 #pragma mark - 00263 #pragma mark Adding Text 00264 00270 - (void)addText:(SCText *)text; 00271 00278 - (void)insertText:(SCText *)text atIndex:(SCIndex)index; 00279 00280 #pragma mark - 00281 #pragma mark Removing Text 00282 00287 - (void)removeAllText; 00288 00294 - (void)removeTextInRange:(NSRange)range; 00295 00301 - (void)removeTextFromIndex:(SCIndex)index; 00302 00308 - (void)removeTextToIndex:(SCIndex)index; 00309 00318 - (void)removeTextWithSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00319 00326 - (void)removeTextWithSubstring:(NSString *)substring; 00327 00336 - (void)removeTextWithoutSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00337 00344 - (void)removeTextWithoutSubstring:(NSString *)substring; 00345 00354 - (void)removeSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00355 00362 - (void)removeSubstring:(NSString *)substring; 00363 00370 - (SCText *)cutTextInRange:(NSRange)range; 00371 00379 - (SCText *)cutTextFromIndex:(SCIndex)index; 00380 00388 - (SCText *)cutTextToIndex:(SCIndex)index; 00389 00390 #pragma mark - 00391 #pragma mark Replacing Text 00392 00399 - (void)replaceTextInRange:(NSRange)range withText:(SCText *)text; 00400 00408 - (void)replaceTextInRange:(NSRange)range withStrings:(NSString *)string, ...; 00409 00416 - (void)replaceTextInRange:(NSRange)range withStringsFromCollection:(id)collection; 00417 00424 - (void)replaceTextInRange:(NSRange)range withStringsFromList:(SCStrings *)list; 00425 00432 - (void)replaceTextFromIndex:(SCIndex)index withText:(SCText *)text; 00433 00441 - (void)replaceTextFromIndex:(SCIndex)index withStrings:(NSString *)string, ...; 00442 00449 - (void)replaceTextFromIndex:(SCIndex)index withStringsFromCollection:(id)collection; 00450 00457 - (void)replaceTextFromIndex:(SCIndex)index withStringsFromList:(SCStrings *)list; 00458 00465 - (void)replaceTextToIndex:(SCIndex)index withText:(SCText *)text; 00466 00474 - (void)replaceTextToIndex:(SCIndex)index withStrings:(NSString *)string, ...; 00475 00482 - (void)replaceTextToIndex:(SCIndex)index withStringsFromCollection:(id)collection; 00483 00490 - (void)replaceTextToIndex:(SCIndex)index withStringsFromList:(SCStrings *)list; 00491 00492 #pragma mark - 00493 #pragma mark Moving and Copying Text 00494 00501 - (void)exchangeTextInRange:(NSRange)source withTextInRange:(NSRange)destination; 00502 00508 - (void)duplicateTextInRange:(NSRange)range; 00509 00515 - (void)duplicateTextFromIndex:(SCIndex)index; 00516 00522 - (void)duplicateTextToIndex:(SCIndex)index; 00523 00529 - (void)duplicateStringsInRange:(NSRange)range; 00530 00536 - (void)duplicateStringsFromIndex:(SCIndex)index; 00537 00543 - (void)duplicateStringsToIndex:(SCIndex)index; 00544 00551 - (void)copyTextInRange:(NSRange)range toIndex:(SCIndex)destination; 00552 00559 - (void)copyTextFromIndex:(SCIndex)index toIndex:(SCIndex)destination; 00560 00567 - (void)copyTextToIndex:(SCIndex)index toIndex:(SCIndex)destination; 00568 00575 - (void)moveTextInRange:(NSRange)range toIndex:(SCIndex)destination; 00576 00583 - (void)moveTextFromIndex:(SCIndex)index toIndex:(SCIndex)destination; 00584 00591 - (void)moveTextToIndex:(SCIndex)index toIndex:(SCIndex)destination; 00592 00599 - (void)forwardMoveTextInRange:(NSRange)range steps:(SCULong)steps; 00600 00607 - (void)forwardMoveTextFromIndex:(SCIndex)index steps:(SCULong)steps; 00608 00614 - (void)forwardMoveTextInRange:(NSRange)range; 00615 00621 - (void)forwardMoveTextFromIndex:(SCIndex)index; 00622 00629 - (void)backwardMoveTextInRange:(NSRange)range steps:(SCULong)steps; 00630 00637 - (void)backwardMoveTextToIndex:(SCIndex)index steps:(SCULong)steps; 00638 00644 - (void)backwardMoveTextInRange:(NSRange)range; 00645 00651 - (void)backwardMoveTextToIndex:(SCIndex)index; 00652 00658 - (void)moveToFirstPositionTextInRange:(NSRange)range; 00659 00665 - (void)moveToFirstPositionTextFromIndex:(SCIndex)index; 00666 00672 - (void)moveToLastPositionTextInRange:(NSRange)range; 00673 00679 - (void)moveToLastPositionTextToIndex:(SCIndex)index; 00680 00681 #pragma mark - 00682 #pragma mark Querying Text 00683 00690 - (SCText *)textInRange:(NSRange)range; 00691 00698 - (SCText *)textFromIndex:(SCIndex)index; 00699 00706 - (SCText *)textToIndex:(SCIndex)index; 00707 00708 #pragma mark - 00709 #pragma mark Finding and Selecting Strings 00710 00719 - (BOOL)containsText:(SCText *)text caseInsensitive:(BOOL)value; 00720 00727 - (BOOL)containsText:(SCText *)text; 00728 00737 - (SCIndex)indexOfText:(SCText *)text caseInsensitive:(BOOL)value; 00738 00745 - (SCIndex)indexOfText:(SCText *)text; 00746 00755 - (SCUInteger)countOfText:(SCText *)text caseInsensitive:(BOOL)value; 00756 00763 - (SCUInteger)countOfText:(SCText *)text; 00764 00773 - (SCArray *)indexesOfText:(SCText *)text caseInsensitive:(BOOL)value; 00774 00782 - (SCArray *)indexesOfText:(SCText *)text; 00783 00792 - (SCText *)textWithSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00793 00800 - (SCText *)textWithSubstring:(NSString *)substring; 00801 00810 - (SCText *)textWithoutSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00811 00818 - (SCText *)textWithoutSubstring:(NSString *)substring; 00819 00828 - (SCTextIndex *)textIndexOfSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00829 00836 - (SCTextIndex *)textIndexOfSubstring:(NSString *)substring; 00837 00846 - (SCArray *)textIndexesOfSubstring:(NSString *)substring caseInsensitive:(BOOL)value; 00847 00854 - (SCArray *)textIndexesOfSubstring:(NSString *)substring; 00855 00856 @end
1.7.3