-
Notifications
You must be signed in to change notification settings - Fork 9
/
NSString+InflectionSupport.h
48 lines (39 loc) · 1016 Bytes
/
NSString+InflectionSupport.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// NSString+InflectionSupport.h
//
//
// Created by Ryan Daigle on 7/31/08.
// Copyright 2008 yFactorial, LLC.
//
@interface NSString (InflectionSupport)
- (NSString *)deCamelizeWith:(NSString *)delimiter;
/**
* Return the dashed form af this camelCase string:
*
* [@"camelCase" dasherize] //> @"camel-case"
*/
- (NSString *)dasherize;
/**
* Return the underscored form af this camelCase string:
*
* [@"camelCase" underscore] //> @"camel_case"
*/
- (NSString *)underscore;
/**
* Return the camelCase form af this dashed/underscored string:
*
* [@"camel-case_string" camelize] //> @"camelCaseString"
*/
- (NSString *)camelize;
- (NSString *)camelizeCached;
/**
* Return a copy of the string suitable for displaying in a title. Each word is downcased, with the first letter upcased.
*/
- (NSString *)titleize;
- (NSString *)decapitalize;
/**
* Return a copy of the string with the first letter capitalized.
*/
- (NSString *)toClassName;
- (BOOL) stringIsEmptyOrWhitespace;
@end