<commit_before>//
//  NSString+RubyCocoaString.h
//  RubyCocoaString
//
//  Created by <NAME> on 12/23/12.
//  Copyright (c) 2012 <NAME> Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

#define RC_REGEX(regex) [NSRegularExpression regularExpressionWithPattern:(regex) \
							options:0 \
							error:nil]

@interface NSString (RubyCocoaString)

- (NSString *)camelize;
- (NSString *)capitalize;
- (NSString *)concat:(NSString *)aString;
- (NSString *)downcase;
- (void)eachChar:(void (^)(NSString *ch))block;
- (BOOL)endsWith:(NSString *)endString;
- (NSString *)gsub:(NSString *)regexStr withString:(NSString *)replacementString;
- (NSString *)gsubRegex:(NSRegularExpression *)regex withString:(NSString *)replacementString;
// NOTE: This does not currently meet all semantic use cases of the Ruby implementation.
- (NSString *)gsub:(NSString *)regexStr withBlock:(NSString *(^)(NSString *str, NSRange range))block;
- (NSString *)gsubRegex:(NSRegularExpression *)regex withBlock:(NSString *(^)(NSString *str, NSRange range))block;
- (BOOL)isEmpty; // True if it is literally the empty string (@"")
- (BOOL)isBlank; // True if it is just whitespace characters (@"  \t\n")
- (BOOL)isPresent; // Opposite of isBlank
- (NSString *)lowerCamelize;
- (NSString *)reverse;
- (NSArray *)split:(NSString *)splitString;
- (BOOL)startsWith:(NSString *)startString;
- (NSString *)strip;
- (NSString *)underscore;
- (NSString *)upcase;

// Unimplemented Methods (Do not attempt to implement without first writing test cases!)

// TODO: create a varg_list version, perhaps?
- (NSString *)delete:(NSString *)delString;
- (NSString *)center:(NSInteger)width;
- (NSString *)center:(NSInteger)width padString:(NSString *)padString;

@end<commit_msg>Moved center method declarations into implemented section.<commit_after>//
//  NSString+RubyCocoaString.h
//  RubyCocoaString
//
//  Created by <NAME> on 12/23/12.
//  Copyright (c) 2012 <NAME> Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

#define RC_REGEX(regex) [NSRegularExpression regularExpressionWithPattern:(regex) \
							options:0 \
							error:nil]

@interface NSString (RubyCocoaString)

- (NSString *)camelize;
- (NSString *)center:(NSInteger)width;
- (NSString *)center:(NSInteger)width padString:(NSString *)padString;
- (NSString *)capitalize;
- (NSString *)concat:(NSString *)aString;
- (NSString *)downcase;
- (void)eachChar:(void (^)(NSString *ch))block;
- (BOOL)endsWith:(NSString *)endString;
- (NSString *)gsub:(NSString *)regexStr withString:(NSString *)replacementString;
- (NSString *)gsubRegex:(NSRegularExpression *)regex withString:(NSString *)replacementString;
// NOTE: This does not currently meet all semantic use cases of the Ruby implementation.
- (NSString *)gsub:(NSString *)regexStr withBlock:(NSString *(^)(NSString *str, NSRange range))block;
- (NSString *)gsubRegex:(NSRegularExpression *)regex withBlock:(NSString *(^)(NSString *str, NSRange range))block;
- (BOOL)isEmpty; // True if it is literally the empty string (@"")
- (BOOL)isBlank; // True if it is just whitespace characters (@"  \t\n")
- (BOOL)isPresent; // Opposite of isBlank
- (NSString *)lowerCamelize;
- (NSString *)reverse;
- (NSArray *)split:(NSString *)splitString;
- (BOOL)startsWith:(NSString *)startString;
- (NSString *)strip;
- (NSString *)underscore;
- (NSString *)upcase;

// Unimplemented Methods (Do not attempt to implement without first writing test cases!)

// TODO: create a varg_list version, perhaps?
- (NSString *)delete:(NSString *)delString;

@end
{'fraction_non_alphanumeric': 0.15664690939881457, 'fraction_numerical': 0.006209427039232289, 'mean_word_length': 5.420289855072464, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3005341', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1051, 'n_words': 297}