forked from tupil/hyphenate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNSString+Hyphenate.h
29 lines (24 loc) · 1012 Bytes
/
NSString+Hyphenate.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
//
// NSString+Hyphenate.h
//
// Created by Eelco Lempsink on 09-06-10.
// Copyright 2010 Tupil. All rights reserved.
//
#import <Foundation/Foundation.h>
// This will not work out of the box! You'll need some files from the
// hyphen library and dictionaries. See the README.txt for more information.
@interface NSString (Hyphenate)
// Returns the string with added soft-hyphens (UTF-8 char x00AD).
//
// The hyphenation library will be loaded using the locale identifiers name
// (with the format hyph_%@.dic) and the locale will also be used to tokenize
// the string into words.
//
// If you pass nil as the locale, this function tries to use
// CFStringTokenizerCopyBestStringLanguage to guess the language.
//
// The loaded dictionary will be cached, so for the best performance group your
// hyphenation tasks per locale.
- (NSString*)stringByHyphenatingWithLocale:(NSLocale*)locale;
- (NSString*)stringByHyphenatingWithLocale:(NSLocale*)locale usingSharedDictionaries:(id)dictionaries;
@end