FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSString.h
Go to the documentation of this file.
1 //
2 // NSString.h
3 // FoundationExtension
4 //
5 // Created by Jeong YunWon on 10. 10. 17..
6 // Copyright 2010 youknowone.org All rights reserved.
7 //
8 
16 #import <Foundation/Foundation.h>
17 
19 
20 NS_ASSUME_NONNULL_BEGIN
21 
26 
34 - (instancetype)initWithInteger:(NSInteger)value;
35 
40 - (instancetype)initWithConcatnatingStrings:(NSString *)first, ... NS_REQUIRES_NIL_TERMINATION;
41 
48 + (instancetype)stringWithInteger:(NSInteger)value;
49 
55 + (instancetype)stringWithFormat:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
56 
62 + (nullable instancetype)stringWithData:(NSData *)data encoding:(NSStringEncoding)encoding;
63 
67 + (instancetype)stringWithConcatnatingStrings:(NSString *)first, ... NS_REQUIRES_NIL_TERMINATION;
68 
69 @end
70 
71 
76 
89 - (NSString *)format:(id)first, ...;
100 - (NSString *)format0:(nullable id)dummyLikeNil, ...;
101 
109 - (NSRange)range;
110 
119 - (NSString *)substringFromIndex:(NSUInteger)from length:(NSUInteger)length;
128 - (NSString *)substringFromIndex:(NSUInteger)from toIndex:(NSUInteger)to;
129 
138 - (NSString *)stringByTrimmingWhitespaceCharacters;
147 - (NSString *)stringByTrimmingWhitespaceAndNewlineCharacters;
156 - (NSString *)stringByTrimmingNewlineCharacters;
157 
158 @end
159 
160 
167 
172 + (instancetype)stringWithUTF8Data:(NSData *)data;
173 
179 - (nullable NSData *)dataUsingUTF8Encoding;
180 
181 @end
182 
183 
188 
197 - (NSInteger)integerValueBase:(NSInteger)radix;
206 - (NSInteger)hexadecimalValue;
207 
208 @end
209 
210 
212 
213 #define _Nullable
214 
215 - (nullable NSString *)stringByReplacingRegularExpressionWithPattern:pattern withTemplate:(nonnull NSString *)templ error:(NSError * _Nullable __autoreleasing * _Nullable)error;
216 
217 @end
218 
219 
224 
230 @property(nonatomic, readonly) NSString *stringUsingUTF8Encoding;
231 
232 @end
233 
234 
236 
246 - (BOOL)hasSubstring:(NSString *)aString __deprecated;
247 
248 @end
249 
NSData extension for NSString.
Definition: NSString.h:223
#define _Nullable
Definition: NSString.h:213
#define nullable
Definition: NSMacro.h:20
NSString creation method extension.
Definition: NSString.h:25
#define nonnull
Definition: NSMacro.h:21
NSString method shortcuts.
Definition: NSString.h:75
NSString * stringUsingUTF8Encoding
Creates and returns an NSString object initialized by converting given data into Unicode characters u...
Definition: NSString.h:230
Definition: NSString.h:211
Shortcut for UTF8.
Definition: NSString.h:166
Numeric value evaluation.
Definition: NSString.h:187
Definition: NSString.h:235
#define NS_ASSUME_NONNULL_END
Definition: NSMacro.h:14