diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-09 15:26:03 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-10 07:56:06 -0800 |
commit | dea1a3033256b9932fe4b0314f0e5533857b8b53 (patch) | |
tree | debaf4bb035fcf87d8ead3e9dbd7e105786c684f /platform/darwin/src/NSString+MGLAdditions.h | |
parent | 9d55c0f479aad655566f3a9e7841d155463d51a1 (diff) | |
download | qtlocation-mapboxgl-dea1a3033256b9932fe4b0314f0e5533857b8b53.tar.gz |
[ios, macos] Title case attribution buttons
Also added a category method on NSString for title casing the string, plus tests.
Diffstat (limited to 'platform/darwin/src/NSString+MGLAdditions.h')
-rw-r--r-- | platform/darwin/src/NSString+MGLAdditions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/darwin/src/NSString+MGLAdditions.h b/platform/darwin/src/NSString+MGLAdditions.h index 45fea25588..246dc084f4 100644 --- a/platform/darwin/src/NSString+MGLAdditions.h +++ b/platform/darwin/src/NSString+MGLAdditions.h @@ -10,6 +10,15 @@ NS_ASSUME_NONNULL_BEGIN /** Returns the receiver if non-empty or nil if empty. */ - (nullable NSString *)mgl_stringOrNilIfEmpty; +/** + Returns a title-cased representation of the receiver using the specified + locale. + + @param The locale. For strings presented to users, pass in the current locale + (`+[NSLocale currentLocale]`). To use the system locale, pass in `nil`. + */ +- (NSString *)mgl_titleCasedStringWithLocale:(NSLocale *)locale; + @end @interface NSAttributedString (MGLAdditions) |