forked from dev2dev/Molecules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVCTitleCase.h
36 lines (30 loc) · 824 Bytes
/
VCTitleCase.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
//
// VCTitleCase.m
// Title Case extension for NSString
//
// Based on titlecase.pl by:
// John Gruber
// http://daringfireball.net/
// 10 May 2008
//
// Cocoa Foundation version by:
// Marshall Elfstrand
// http://vengefulcow.com/
// 24 May 2008
//
// License: http://www.opensource.org/licenses/mit-license.php
//
#import <Foundation/Foundation.h>
/*!
This category adds a "titlecaseString" method to NSString objects.
*/
@interface NSString (VCTitleCase)
/*!
Returns a title-cased version of the string.
This changes all words to Title Caps, and attempts to be clever
about *un*capitalizing small words like a/an/the in the input.
The list of "small words" which are not capped comes from
the New York Times Manual of Style, plus "vs" ans "v".
*/
- (NSString *)titlecaseString;
@end