Skip to content

Commit

Permalink
Add new methods to NSString extensions 1 of 2
Browse files Browse the repository at this point in the history
New methods for stripping leading and/or trailing characters from string.
  • Loading branch information
AnotherCommander authored Sep 23, 2024
1 parent 8a7b0c2 commit 1671163
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Core/NSStringOOExtensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ MA 02110-1301, USA.
*/
- (uint32_t) oo_hash;


/* -stringByTrimmingLeadingCharactersInSet:
Strips characters belonging to selected character set from start of string.
*/
- (NSString *)stringByTrimmingLeadingCharactersInSet:(NSCharacterSet *)characterSet;


/* -stringByTrimmingLeadingWhitespaceAndNewlineCharacters:
Strips leading whtiespaces and newline characters from string.
*/
- (NSString *)stringByTrimmingLeadingWhitespaceAndNewlineCharacters;


/* -stringByTrimmingTrailingCharactersInSet:
Strips characters belonging to selected character set from end of string.
*/
- (NSString *)stringByTrimmingTrailingCharactersInSet:(NSCharacterSet *)characterSet;


/* -stringByTrimmingTrailingWhitespaceAndNewlineCharacters:
Strips trailing whtiespaces and newline characters from string.
*/
- (NSString *)stringByTrimmingTrailingWhitespaceAndNewlineCharacters;

@end


Expand Down

0 comments on commit 1671163

Please sign in to comment.