forked from cocodelabs/NSAttributedString-CCLFormat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNSAttributedString+CCLFormat.h
More file actions
43 lines (35 loc) · 2.28 KB
/
Copy pathNSAttributedString+CCLFormat.h
File metadata and controls
43 lines (35 loc) · 2.28 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
31
32
33
34
35
36
37
38
39
40
41
42
//
// NSAttributedString+CCLFormat.h
// Cocode
//
// Created by Kyle Fuller on 06/11/2012.
// Copyright (c) 2012-2014 Cocode. All rights reserved.
//
#import <Foundation/Foundation.h>
/** Attributed string extension for creating attributed strings from a format string. */
@interface NSAttributedString (CCLFormat)
/** Returns an attributed string created by using a given format string as a template into which the remaining argument values are substituted.
@param format A format string. This value must not be nil.
@param ... A comma-separated list of arguments to substitute into format.
@return An attributed string created by using format as a template into which the remaining argument values are substituted.
*/
+ (instancetype)attributedStringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
/** Returns an attributed string created by using a given format string as a template into which the remaining argument values are substituted.
@param format A format string. This value must not be nil.
@param arguments list of arguments to substitute into format.
@return An attributed string created by using format as a template into which the remaining argument values are substituted.
*/
+ (instancetype)attributedStringWithFormat:(NSString *)format arguments:(va_list)arguments NS_FORMAT_FUNCTION(1,0);
/** Returns an attributed string created by using a given format string as a template into which the remaining argument values are substituted.
@param format A format string. This value must not be nil.
@param ... A comma-separated list of arguments to substitute into format.
@return An attributed string created by using format as a template into which the remaining argument values are substituted.
*/
- (instancetype)initWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
/** Returns an attributed string created by using a given format string as a template into which the remaining argument values are substituted.
@param format A format string. This value must not be nil.
@param arguments list of arguments to substitute into format.
@return An attributed string created by using format as a template into which the remaining argument values are substituted.
*/
- (instancetype)initWithFormat:(NSString *)format arguments:(va_list)arguments NS_FORMAT_FUNCTION(1,0);
@end