Skip to content
This repository
tree: 27c06082df
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 31 lines (22 sloc) 1.273 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
//
// NSString+DKAdditions.h
// Created by Gregory Combs on 6/11/11.
//
// StatesLege by Sunlight Foundation, based on work at https://github.com/sunlightlabs/StatesLege
//
// This work is licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/
// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
//
//

#import <Foundation/Foundation.h>


@interface NSString(DKAdditions)

- (NSComparisonResult) localisedCaseInsensitiveNumericCompare:(NSString*) anotherString;

- (NSString*) stringByCapitalizingFirstCharacter;
// returns a copy of the receiver with just the first character capitalized, ignoring all others. Thus, the rest of the string isn't necessarily forced to
// lowercase, as happens in [NSString capitalizedString]


- (NSString*) abbreviateStringWithDictionary:(NSDictionary*) abbreviations;
// breaks a string into words. If any words are keys in the dictionary, the word is substituted by its value.
// Keys are case insensitive (dictionary should have lower case keys) and words are substituted
// with the verbatim value. If dictionary is nil, self is returned.
@end

Something went wrong with that request. Please try again.