Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSString.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <jacob.carlborg@gmail.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.cocoa.NSString; | 14 module dwt.internal.cocoa.NSString; |
15 | 15 |
16 import tango.core.Vararg : va_list; | 16 import tango.core.Vararg : va_list; |
17 import tango.stdc.stringz : toStringz; | 17 import tango.stdc.stringz : toString16z; |
18 import tango.text.convert.Utf : toString16; | |
18 | 19 |
19 import dwt.dwthelper.utils; | 20 import dwt.dwthelper.utils; |
20 import dwt.internal.cocoa.id; | 21 import dwt.internal.cocoa.id; |
21 import dwt.internal.cocoa.NSArray; | 22 import dwt.internal.cocoa.NSArray; |
22 import dwt.internal.cocoa.NSCharacterSet; | 23 import dwt.internal.cocoa.NSCharacterSet; |
125 super(id); | 126 super(id); |
126 } | 127 } |
127 | 128 |
128 public /*const*/char* UTF8String () | 129 public /*const*/char* UTF8String () |
129 { | 130 { |
130 return cast(/*const*/char*) OS.objc_msgSend(this.id, OS.sel_UTF8String); | 131 return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_UTF8String); |
131 } | 132 } |
132 | 133 |
133 public static NSStringEncoding availableStringEncodings () | 134 public static NSStringEncoding availableStringEncodings () |
134 { | 135 { |
135 return cast(NSStringEncoding) OS.objc_msgSend(OS.class_NSString, OS.sel_availableStringEncodings); | 136 return cast(NSStringEncoding) OS.objc_msgSend(OS.class_NSString, OS.sel_availableStringEncodings); |
136 } | 137 } |
137 | 138 |
138 public bool boolValue () | 139 public bool boolValue () |
139 { | 140 { |
140 return OS.objc_msgSend(this.id, OS.sel_boolValue) !is null; | 141 return OS.objc_msgSend(this.id_, OS.sel_boolValue) !is null; |
141 } | 142 } |
142 | 143 |
143 public /*const char* */byte* cString () | 144 public /*const*/char* cString () |
144 { | 145 { |
145 return cast(/*const char* */byte*) OS.objc_msgSend(this.id, OS.sel_cString); | 146 return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_cString); |
146 } | 147 } |
147 | 148 |
148 public NSUInteger cStringLength () | 149 public NSUInteger cStringLength () |
149 { | 150 { |
150 return OS.objc_msgSend(this.id, OS.sel_cStringLength); | 151 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_cStringLength); |
151 } | 152 } |
152 | 153 |
153 public /*const char* */byte* cStringUsingEncoding (NSStringEncoding encoding) | 154 public /*const*/char* cStringUsingEncoding (NSStringEncoding encoding) |
154 { | 155 { |
155 return cast(/*const char* */byte*) OS.objc_msgSend(this.id, OS.sel_cStringUsingEncoding_1, encoding); | 156 return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_cStringUsingEncoding_1, encoding); |
156 } | 157 } |
157 | 158 |
158 public bool canBeConvertedToEncoding (NSStringEncoding encoding) | 159 public bool canBeConvertedToEncoding (NSStringEncoding encoding) |
159 { | 160 { |
160 return OS.objc_msgSend(this.id, OS.sel_canBeConvertedToEncoding_1, encoding) !is null; | 161 return OS.objc_msgSend(this.id_, OS.sel_canBeConvertedToEncoding_1, encoding) !is null; |
161 } | 162 } |
162 | 163 |
163 public NSString capitalizedString () | 164 public NSString capitalizedString () |
164 { | 165 { |
165 objc.id result = OS.objc_msgSend(this.id, OS.sel_capitalizedString); | 166 objc.id result = OS.objc_msgSend(this.id_, OS.sel_capitalizedString); |
166 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 167 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
167 } | 168 } |
168 | 169 |
169 public NSComparisonResult caseInsensitiveCompare (NSString string) | 170 public NSComparisonResult caseInsensitiveCompare (NSString string) |
170 { | 171 { |
171 return OS.objc_msgSend(this.id, OS.sel_caseInsensitiveCompare_1, string !is null ? string.id : null); | 172 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_caseInsensitiveCompare_1, string !is null ? string.id_ : null); |
172 } | 173 } |
173 | 174 |
174 public wchar characterAtIndex (NSUInteger index) | 175 public wchar characterAtIndex (NSUInteger index) |
175 { | 176 { |
176 return cast(wchar) OS.objc_msgSend(this.id, OS.sel_characterAtIndex_1, index); | 177 return cast(wchar) OS.objc_msgSend(this.id_, OS.sel_characterAtIndex_1, index); |
177 } | 178 } |
178 | 179 |
179 public NSString commonPrefixWithString (NSString aString, NSStringCompareOptions mask) | 180 public NSString commonPrefixWithString (NSString aString, NSStringCompareOptions mask) |
180 { | 181 { |
181 objc.id result = OS.objc_msgSend(this.id, OS.sel_commonPrefixWithString_1options_1, aString !is null ? aString.id : null, mask); | 182 objc.id result = OS.objc_msgSend(this.id_, OS.sel_commonPrefixWithString_1options_1, aString !is null ? aString.id_ : null, mask); |
182 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 183 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
183 } | 184 } |
184 | 185 |
185 public NSComparisonResult compare_ (NSString string) | 186 public NSComparisonResult compare_ (NSString string) |
186 { | 187 { |
187 return cast(NSComparisonResult) OS.objc_msgSend(this.id, OS.sel_compare_1, string !is null ? string.id : null); | 188 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, string !is null ? string.id_ : null); |
188 } | 189 } |
189 | 190 |
190 public NSComparisonResult compare_options_ (NSString string, NSStringCompareOptions mask) | 191 public NSComparisonResult compare_options_ (NSString string, NSStringCompareOptions mask) |
191 { | 192 { |
192 return cast(NSComparisonResult) OS.objc_msgSend(this.id, OS.sel_compare_1options_1, string !is null ? string.id : null, mask); | 193 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1options_1, string !is null ? string.id_ : null, mask); |
193 } | 194 } |
194 | 195 |
195 public NSComparisonResult compare_options_range_ (NSString string, NSStringCompareOptions mask, NSRange compareRange) | 196 public NSComparisonResult compare_options_range_ (NSString string, NSStringCompareOptions mask, NSRange compareRange) |
196 { | 197 { |
197 return cast(NSComparisonResult) OS.objc_msgSend(this.id, OS.sel_compare_1options_1range_1, string !is null ? string.id : null, mask, | 198 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1options_1range_1, string !is null ? string.id_ : null, mask, |
198 compareRange); | 199 compareRange); |
199 } | 200 } |
200 | 201 |
201 public NSComparisonResult compare_options_range_locale_ (NSString string, NSStringCompareOptions mask, NSRange compareRange, id locale) | 202 public NSComparisonResult compare_options_range_locale_ (NSString string, NSStringCompareOptions mask, NSRange compareRange, id locale) |
202 { | 203 { |
203 return cast(NSComparisonResult) OS.objc_msgSend(this.id, OS.sel_compare_1options_1range_1locale_1, string !is null ? string.id : null, mask, | 204 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1options_1range_1locale_1, string !is null ? string.id_ : null, mask, |
204 compareRange, locale !is null ? locale.id : null); | 205 compareRange, locale !is null ? locale.id_ : null); |
205 } | 206 } |
206 | 207 |
207 public NSUInteger completePathIntoString (/*NSString** */objc.id** outputName, bool flag, /*NSArray** */objc.id** outputArray, | 208 public NSUInteger completePathIntoString (/*NSString** */objc.id** outputName, bool flag, /*NSArray** */objc.id** outputArray, |
208 NSArray filterTypes) | 209 NSArray filterTypes) |
209 { | 210 { |
210 return OS.objc_msgSend(this.id, OS.sel_completePathIntoString_1caseSensitive_1matchesIntoArray_1filterTypes_1, outputName, flag, outputArray, | 211 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_completePathIntoString_1caseSensitive_1matchesIntoArray_1filterTypes_1, outputName, flag, outputArray, |
211 filterTypes !is null ? filterTypes.id : null); | 212 filterTypes !is null ? filterTypes.id_ : null); |
212 } | 213 } |
213 | 214 |
214 public NSArray componentsSeparatedByCharactersInSet (NSCharacterSet separator) | 215 public NSArray componentsSeparatedByCharactersInSet (NSCharacterSet separator) |
215 { | 216 { |
216 objc.id result = OS.objc_msgSend(this.id, OS.sel_componentsSeparatedByCharactersInSet_1, separator !is null ? separator.id : null); | 217 objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsSeparatedByCharactersInSet_1, separator !is null ? separator.id_ : null); |
217 return result !is null ? new NSArray(result) : null; | 218 return result !is null ? new NSArray(result) : null; |
218 } | 219 } |
219 | 220 |
220 public NSArray componentsSeparatedByString (NSString separator) | 221 public NSArray componentsSeparatedByString (NSString separator) |
221 { | 222 { |
222 objc.id result = OS.objc_msgSend(this.id, OS.sel_componentsSeparatedByString_1, separator !is null ? separator.id : null); | 223 objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsSeparatedByString_1, separator !is null ? separator.id_ : null); |
223 return result !is null ? new NSArray(result) : null; | 224 return result !is null ? new NSArray(result) : null; |
224 } | 225 } |
225 | 226 |
226 public NSData dataUsingEncoding_ (NSStringEncoding encoding) | 227 public NSData dataUsingEncoding_ (NSStringEncoding encoding) |
227 { | 228 { |
228 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataUsingEncoding_1, encoding); | 229 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataUsingEncoding_1, encoding); |
229 return result !is null ? new NSData(result) : null; | 230 return result !is null ? new NSData(result) : null; |
230 } | 231 } |
231 | 232 |
232 public NSData dataUsingEncoding_allowLossyConversion_ (NSStringEncoding encoding, bool lossy) | 233 public NSData dataUsingEncoding_allowLossyConversion_ (NSStringEncoding encoding, bool lossy) |
233 { | 234 { |
234 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataUsingEncoding_1allowLossyConversion_1, encoding, lossy); | 235 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataUsingEncoding_1allowLossyConversion_1, encoding, lossy); |
235 return result !is null ? new NSData(result) : null; | 236 return result !is null ? new NSData(result) : null; |
236 } | 237 } |
237 | 238 |
238 public NSString decomposedStringWithCanonicalMapping () | 239 public NSString decomposedStringWithCanonicalMapping () |
239 { | 240 { |
240 objc.id result = OS.objc_msgSend(this.id, OS.sel_decomposedStringWithCanonicalMapping); | 241 objc.id result = OS.objc_msgSend(this.id_, OS.sel_decomposedStringWithCanonicalMapping); |
241 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 242 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
242 } | 243 } |
243 | 244 |
244 public NSString decomposedStringWithCompatibilityMapping () | 245 public NSString decomposedStringWithCompatibilityMapping () |
245 { | 246 { |
246 objc.id result = OS.objc_msgSend(this.id, OS.sel_decomposedStringWithCompatibilityMapping); | 247 objc.id result = OS.objc_msgSend(this.id_, OS.sel_decomposedStringWithCompatibilityMapping); |
247 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 248 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
248 } | 249 } |
249 | 250 |
250 public static NSStringEncoding defaultCStringEncoding () | 251 public static NSStringEncoding defaultCStringEncoding () |
251 { | 252 { |
252 return cast(NSStringEncoding) OS.objc_msgSend(OS.class_NSString, OS.sel_defaultCStringEncoding); | 253 return cast(NSStringEncoding) OS.objc_msgSend(OS.class_NSString, OS.sel_defaultCStringEncoding); |
253 } | 254 } |
254 | 255 |
255 public NSString description () | 256 public NSString description () |
256 { | 257 { |
257 objc.id result = OS.objc_msgSend(this.id, OS.sel_description); | 258 objc.id result = OS.objc_msgSend(this.id_, OS.sel_description); |
258 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 259 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
259 } | 260 } |
260 | 261 |
261 public double doubleValue () | 262 public double doubleValue () |
262 { | 263 { |
263 return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue); | 264 return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue); |
264 } | 265 } |
265 | 266 |
266 public NSStringEncoding fastestEncoding () | 267 public NSStringEncoding fastestEncoding () |
267 { | 268 { |
268 return cast(NSStringEncoding) OS.objc_msgSend(this.id, OS.sel_fastestEncoding); | 269 return cast(NSStringEncoding) OS.objc_msgSend(this.id_, OS.sel_fastestEncoding); |
269 } | 270 } |
270 | 271 |
271 public /*const char* */byte* fileSystemRepresentation () | 272 public /*const*/char* fileSystemRepresentation () |
272 { | 273 { |
273 return cast(/*const char* */byte*) OS.objc_msgSend(this.id, OS.sel_fileSystemRepresentation); | 274 return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_fileSystemRepresentation); |
274 } | 275 } |
275 | 276 |
276 public float floatValue () | 277 public float floatValue () |
277 { | 278 { |
278 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_floatValue); | 279 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue); |
279 } | 280 } |
280 | 281 |
281 public bool getBytes (void* buffer, NSUInteger maxBufferCount, NSUInteger* usedBufferCount, NSStringEncoding encoding, NSStringEncodingConversionOptions options, | 282 public bool getBytes (void* buffer, NSUInteger maxBufferCount, NSUInteger* usedBufferCount, NSStringEncoding encoding, NSStringEncodingConversionOptions options, |
282 NSRange range, NSRangePointer leftover) | 283 NSRange range, NSRangePointer leftover) |
283 { | 284 { |
284 return OS.objc_msgSend(this.id, OS.sel_getBytes_1maxLength_1usedLength_1encoding_1options_1range_1remainingRange_1, buffer, maxBufferCount, | 285 return OS.objc_msgSend(this.id_, OS.sel_getBytes_1maxLength_1usedLength_1encoding_1options_1range_1remainingRange_1, buffer, maxBufferCount, |
285 usedBufferCount, encoding, options, range, leftover) !is null; | 286 usedBufferCount, encoding, options, range, leftover) !is null; |
286 } | 287 } |
287 | 288 |
288 public void getCString_ (/*char* */byte* bytes) | 289 public void getCString_ (/*char* */byte* bytes) |
289 { | 290 { |
290 OS.objc_msgSend(this.id, OS.sel_getCString_1, bytes); | 291 OS.objc_msgSend(this.id_, OS.sel_getCString_1, bytes); |
291 } | 292 } |
292 | 293 |
293 public void getCString_maxLength_ (/*char* */byte* bytes, NSUInteger maxLength) | 294 public void getCString_maxLength_ (/*char* */byte* bytes, NSUInteger maxLength) |
294 { | 295 { |
295 OS.objc_msgSend(this.id, OS.sel_getCString_1maxLength_1, bytes, maxLength); | 296 OS.objc_msgSend(this.id_, OS.sel_getCString_1maxLength_1, bytes, maxLength); |
296 } | 297 } |
297 | 298 |
298 public bool getCString_maxLength_encoding_ (/*char* */byte* buffer, NSUInteger maxBufferCount, NSStringEncoding encoding) | 299 public bool getCString_maxLength_encoding_ (/*char* */byte* buffer, NSUInteger maxBufferCount, NSStringEncoding encoding) |
299 { | 300 { |
300 return OS.objc_msgSend(this.id, OS.sel_getCString_1maxLength_1encoding_1, buffer, maxBufferCount, encoding) !is null; | 301 return OS.objc_msgSend(this.id_, OS.sel_getCString_1maxLength_1encoding_1, buffer, maxBufferCount, encoding) !is null; |
301 } | 302 } |
302 | 303 |
303 public void getCString_maxLength_range_remainingRange_ (/*char* */byte* bytes, NSUInteger maxLength, NSRange aRange, NSRangePointer leftoverRange) | 304 public void getCString_maxLength_range_remainingRange_ (/*char* */byte* bytes, NSUInteger maxLength, NSRange aRange, NSRangePointer leftoverRange) |
304 { | 305 { |
305 OS.objc_msgSend(this.id, OS.sel_getCString_1maxLength_1range_1remainingRange_1, bytes, maxLength, aRange, leftoverRange); | 306 OS.objc_msgSend(this.id_, OS.sel_getCString_1maxLength_1range_1remainingRange_1, bytes, maxLength, aRange, leftoverRange); |
306 } | 307 } |
307 | 308 |
308 public void getCharacters_ (wchar* buffer) | 309 public void getCharacters_ (wchar* buffer) |
309 { | 310 { |
310 OS.objc_msgSend(this.id, OS.sel_getCharacters_1, buffer); | 311 OS.objc_msgSend(this.id_, OS.sel_getCharacters_1, buffer); |
311 } | 312 } |
312 | 313 |
313 public void getCharacters_range_ (wchar* buffer, NSRange aRange) | 314 public void getCharacters_range_ (wchar* buffer, NSRange aRange) |
314 { | 315 { |
315 OS.objc_msgSend(this.id, OS.sel_getCharacters_1range_1, buffer, aRange); | 316 OS.objc_msgSend(this.id_, OS.sel_getCharacters_1range_1, buffer, aRange); |
316 } | 317 } |
317 | 318 |
318 public bool getFileSystemRepresentation (/*char* */byte* cname, NSUInteger max) | 319 public bool getFileSystemRepresentation (/*char* */byte* cname, NSUInteger max) |
319 { | 320 { |
320 return OS.objc_msgSend(this.id, OS.sel_getFileSystemRepresentation_1maxLength_1, cname, max) !is null; | 321 return OS.objc_msgSend(this.id_, OS.sel_getFileSystemRepresentation_1maxLength_1, cname, max) !is null; |
321 } | 322 } |
322 | 323 |
323 public void getLineStart (NSUInteger* startPtr, NSUInteger* lineEndPtr, NSUInteger* contentsEndPtr, NSRange range) | 324 public void getLineStart (NSUInteger* startPtr, NSUInteger* lineEndPtr, NSUInteger* contentsEndPtr, NSRange range) |
324 { | 325 { |
325 OS.objc_msgSend(this.id, OS.sel_getLineStart_1end_1contentsEnd_1forRange_1, startPtr, lineEndPtr, contentsEndPtr, range); | 326 OS.objc_msgSend(this.id_, OS.sel_getLineStart_1end_1contentsEnd_1forRange_1, startPtr, lineEndPtr, contentsEndPtr, range); |
326 } | 327 } |
327 | 328 |
328 public void getParagraphStart (NSUInteger* startPtr, NSUInteger* parEndPtr, NSUInteger* contentsEndPtr, NSRange range) | 329 public void getParagraphStart (NSUInteger* startPtr, NSUInteger* parEndPtr, NSUInteger* contentsEndPtr, NSRange range) |
329 { | 330 { |
330 OS.objc_msgSend(this.id, OS.sel_getParagraphStart_1end_1contentsEnd_1forRange_1, startPtr, parEndPtr, contentsEndPtr, range); | 331 OS.objc_msgSend(this.id_, OS.sel_getParagraphStart_1end_1contentsEnd_1forRange_1, startPtr, parEndPtr, contentsEndPtr, range); |
331 } | 332 } |
332 | 333 |
333 public bool hasPrefix (NSString aString) | 334 public bool hasPrefix (NSString aString) |
334 { | 335 { |
335 return OS.objc_msgSend(this.id, OS.sel_hasPrefix_1, aString !is null ? aString.id : null) !is null; | 336 return OS.objc_msgSend(this.id_, OS.sel_hasPrefix_1, aString !is null ? aString.id_ : null) !is null; |
336 } | 337 } |
337 | 338 |
338 public bool hasSuffix (NSString aString) | 339 public bool hasSuffix (NSString aString) |
339 { | 340 { |
340 return OS.objc_msgSend(this.id, OS.sel_hasSuffix_1, aString !is null ? aString.id : null) !is null; | 341 return OS.objc_msgSend(this.id_, OS.sel_hasSuffix_1, aString !is null ? aString.id_ : null) !is null; |
341 } | 342 } |
342 | 343 |
343 public NSUInteger hash () | 344 public NSUInteger hash () |
344 { | 345 { |
345 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_hash); | 346 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_hash); |
346 } | 347 } |
347 | 348 |
348 public NSString initWithBytes (/*const*/void* bytes, NSUInteger len, NSStringEncoding encoding) | 349 public NSString initWithBytes (/*const*/void* bytes, NSUInteger len, NSStringEncoding encoding) |
349 { | 350 { |
350 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithBytes_1length_1encoding_1, bytes, len, encoding); | 351 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytes_1length_1encoding_1, bytes, len, encoding); |
351 return result !is null ? this : null; | 352 return result !is null ? this : null; |
352 } | 353 } |
353 | 354 |
354 public NSString initWithBytesNoCopy (/*const*/void* bytes, NSUInteger len, NSStringEncoding encoding, bool freeBuffer) | 355 public NSString initWithBytesNoCopy (/*const*/void* bytes, NSUInteger len, NSStringEncoding encoding, bool freeBuffer) |
355 { | 356 { |
356 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithBytesNoCopy_1length_1encoding_1freeWhenDone_1, bytes, len, encoding, freeBuffer); | 357 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytesNoCopy_1length_1encoding_1freeWhenDone_1, bytes, len, encoding, freeBuffer); |
357 return result !is null ? this : null; | 358 return result !is null ? this : null; |
358 } | 359 } |
359 | 360 |
360 public NSString initWithCString_ (/*const char* */byte* bytes) | 361 public NSString initWithCString_ (/*const*/char* bytes) |
361 { | 362 { |
362 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCString_1, bytes); | 363 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCString_1, bytes); |
363 return result !is null ? this : null; | 364 return result !is null ? this : null; |
364 } | 365 } |
365 | 366 |
366 public NSString initWithCString_encoding_ (/*const char* */byte* nullTerminatedCString, NSStringEncoding encoding) | 367 public NSString initWithCString_encoding_ (/*const*/char* nullTerminatedCString, NSStringEncoding encoding) |
367 { | 368 { |
368 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCString_1encoding_1, nullTerminatedCString, encoding); | 369 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCString_1encoding_1, nullTerminatedCString, encoding); |
369 return result !is null ? this : null; | 370 return result !is null ? this : null; |
370 } | 371 } |
371 | 372 |
372 public NSString initWithCString_length_ (/*const char* */byte* bytes, NSUInteger length) | 373 public NSString initWithCString_length_ (/*const*/char* bytes, NSUInteger length) |
373 { | 374 { |
374 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCString_1length_1, bytes, length); | 375 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCString_1length_1, bytes, length); |
375 return result !is null ? this : null; | 376 return result !is null ? this : null; |
376 } | 377 } |
377 | 378 |
378 public NSString initWithCStringNoCopy (/*const char* */byte* bytes, NSUInteger length, bool freeBuffer) | 379 public NSString initWithCStringNoCopy (/*const*/char* bytes, NSUInteger length, bool freeBuffer) |
379 { | 380 { |
380 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCStringNoCopy_1length_1freeWhenDone_1, bytes, length, freeBuffer); | 381 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCStringNoCopy_1length_1freeWhenDone_1, bytes, length, freeBuffer); |
381 return result !is null ? this : null; | 382 return result !is null ? this : null; |
382 } | 383 } |
383 | 384 |
384 public NSString initWithCharacters (/*const*/wchar* characters, NSUInteger length) | 385 public NSString initWithCharacters (/*const*/wchar* characters, NSUInteger length) |
385 { | 386 { |
386 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCharacters_1length_1, characters, length); | 387 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCharacters_1length_1, characters, length); |
387 return result !is null ? this : null; | 388 return result !is null ? this : null; |
388 } | 389 } |
389 | 390 |
390 public NSString initWithCharactersNoCopy (/*const*/wchar* characters, NSUInteger length, bool freeBuffer) | 391 public NSString initWithCharactersNoCopy (/*const*/wchar* characters, NSUInteger length, bool freeBuffer) |
391 { | 392 { |
392 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCharactersNoCopy_1length_1freeWhenDone_1, characters, length, freeBuffer); | 393 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCharactersNoCopy_1length_1freeWhenDone_1, characters, length, freeBuffer); |
393 return result !is null ? this : null; | 394 return result !is null ? this : null; |
394 } | 395 } |
395 | 396 |
396 public NSString initWithContentsOfFile_ (NSString path) | 397 public NSString initWithContentsOfFile_ (NSString path) |
397 { | 398 { |
398 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_1, path !is null ? path.id : null); | 399 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, path !is null ? path.id_ : null); |
399 return result !is null ? this : null; | 400 return result !is null ? this : null; |
400 } | 401 } |
401 | 402 |
402 public NSString initWithContentsOfFile_encoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) | 403 public NSString initWithContentsOfFile_encoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) |
403 { | 404 { |
404 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_1encoding_1error_1, path !is null ? path.id : null, enc, error); | 405 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1encoding_1error_1, path !is null ? path.id_ : null, enc, error); |
405 return result !is null ? this : null; | 406 return result !is null ? this : null; |
406 } | 407 } |
407 | 408 |
408 public NSString initWithContentsOfFile_usedEncoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) | 409 public NSString initWithContentsOfFile_usedEncoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) |
409 { | 410 { |
410 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_1usedEncoding_1error_1, path !is null ? path.id : null, enc, error); | 411 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1usedEncoding_1error_1, path !is null ? path.id_ : null, enc, error); |
411 return result !is null ? this : null; | 412 return result !is null ? this : null; |
412 } | 413 } |
413 | 414 |
414 public NSString initWithContentsOfURL_ (NSURL url) | 415 public NSString initWithContentsOfURL_ (NSURL url) |
415 { | 416 { |
416 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1, url !is null ? url.id : null); | 417 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null); |
417 return result !is null ? this : null; | 418 return result !is null ? this : null; |
418 } | 419 } |
419 | 420 |
420 public NSString initWithContentsOfURL_encoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) | 421 public NSString initWithContentsOfURL_encoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) |
421 { | 422 { |
422 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1encoding_1error_1, url !is null ? url.id : null, enc, error); | 423 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1encoding_1error_1, url !is null ? url.id_ : null, enc, error); |
423 return result !is null ? this : null; | 424 return result !is null ? this : null; |
424 } | 425 } |
425 | 426 |
426 public NSString initWithContentsOfURL_usedEncoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) | 427 public NSString initWithContentsOfURL_usedEncoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) |
427 { | 428 { |
428 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1usedEncoding_1error_1, url !is null ? url.id : null, enc, error); | 429 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1usedEncoding_1error_1, url !is null ? url.id_ : null, enc, error); |
429 return result !is null ? this : null; | 430 return result !is null ? this : null; |
430 } | 431 } |
431 | 432 |
432 public NSString initWithData (NSData data, NSStringEncoding encoding) | 433 public NSString initWithData (NSData data, NSStringEncoding encoding) |
433 { | 434 { |
434 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_1encoding_1, data !is null ? data.id : null, encoding); | 435 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1encoding_1, data !is null ? data.id_ : null, encoding); |
435 return result !is null ? this : null; | 436 return result !is null ? this : null; |
436 } | 437 } |
437 | 438 |
438 public NSString initWithFormat_ (NSString initWithFormat) | 439 public NSString initWithFormat_ (NSString initWithFormat) |
439 { | 440 { |
440 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFormat_1, initWithFormat !is null ? initWithFormat.id : null); | 441 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1, initWithFormat !is null ? initWithFormat.id_ : null); |
441 return result !is null ? this : null; | 442 return result !is null ? this : null; |
442 } | 443 } |
443 | 444 |
444 public NSString initWithFormat_arguments_ (NSString format, va_list argList) | 445 public NSString initWithFormat_arguments_ (NSString format, va_list argList) |
445 { | 446 { |
446 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFormat_1arguments_1, format !is null ? format.id : null, argList); | 447 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1arguments_1, format !is null ? format.id_ : null, argList); |
447 return result !is null ? this : null; | 448 return result !is null ? this : null; |
448 } | 449 } |
449 | 450 |
450 public NSString initWithFormat_locale_ (NSString format, id locale) | 451 public NSString initWithFormat_locale_ (NSString format, id locale) |
451 { | 452 { |
452 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFormat_1locale_1, format !is null ? format.id : null, | 453 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1locale_1, format !is null ? format.id_ : null, |
453 locale !is null ? locale.id : null); | 454 locale !is null ? locale.id_ : null); |
454 return result !is null ? this : null; | 455 return result !is null ? this : null; |
455 } | 456 } |
456 | 457 |
457 public NSString initWithFormat_locale_arguments_ (NSString format, id locale, va_list argList) | 458 public NSString initWithFormat_locale_arguments_ (NSString format, id locale, va_list argList) |
458 { | 459 { |
459 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFormat_1locale_1arguments_1, format !is null ? format.id : null, | 460 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1locale_1arguments_1, format !is null ? format.id_ : null, |
460 locale !is null ? locale.id : null, argList); | 461 locale !is null ? locale.id_ : null, argList); |
461 return result !is null ? this : null; | 462 return result !is null ? this : null; |
462 } | 463 } |
463 | 464 |
464 public NSString initWithString (NSString aString) | 465 public NSString initWithString (NSString aString) |
465 { | 466 { |
466 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1, aString !is null ? aString.id : null); | 467 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, aString !is null ? aString.id_ : null); |
467 return result !is null ? this : null; | 468 return result !is null ? this : null; |
468 } | 469 } |
469 | 470 |
470 public NSString initWithUTF8String (/*const*/char* nullTerminatedCString) | 471 public NSString initWithUTF8String (/*const*/char* nullTerminatedCString) |
471 { | 472 { |
472 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUTF8String_1, nullTerminatedCString); | 473 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUTF8String_1, nullTerminatedCString); |
473 return result !is null ? this : null; | 474 return result !is null ? this : null; |
474 } | 475 } |
475 | 476 |
476 public int intValue () | 477 public int intValue () |
477 { | 478 { |
478 return cast(int) OS.objc_msgSend(this.id, OS.sel_intValue); | 479 return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue); |
479 } | 480 } |
480 | 481 |
481 public NSInteger integerValue () | 482 public NSInteger integerValue () |
482 { | 483 { |
483 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_integerValue); | 484 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue); |
484 } | 485 } |
485 | 486 |
486 public bool isAbsolutePath () | 487 public bool isAbsolutePath () |
487 { | 488 { |
488 return OS.objc_msgSend(this.id, OS.sel_isAbsolutePath) !is null; | 489 return OS.objc_msgSend(this.id_, OS.sel_isAbsolutePath) !is null; |
489 } | 490 } |
490 | 491 |
491 public bool isEqualToString (NSString aString) | 492 public bool isEqualToString (NSString aString) |
492 { | 493 { |
493 return OS.objc_msgSend(this.id, OS.sel_isEqualToString_1, aString !is null ? aString.id : null) !is null; | 494 return OS.objc_msgSend(this.id_, OS.sel_isEqualToString_1, aString !is null ? aString.id_ : null) !is null; |
494 } | 495 } |
495 | 496 |
496 public NSString lastPathComponent () | 497 public NSString lastPathComponent () |
497 { | 498 { |
498 objc.id result = OS.objc_msgSend(this.id, OS.sel_lastPathComponent); | 499 objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastPathComponent); |
499 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 500 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
500 } | 501 } |
501 | 502 |
502 public NSUInteger length () | 503 public NSUInteger length () |
503 { | 504 { |
504 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_length); | 505 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_length); |
505 } | 506 } |
506 | 507 |
507 public NSUInteger lengthOfBytesUsingEncoding (NSStringEncoding enc) | 508 public NSUInteger lengthOfBytesUsingEncoding (NSStringEncoding enc) |
508 { | 509 { |
509 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_lengthOfBytesUsingEncoding_1, enc); | 510 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_lengthOfBytesUsingEncoding_1, enc); |
510 } | 511 } |
511 | 512 |
512 public NSRange lineRangeForRange (NSRange range) | 513 public NSRange lineRangeForRange (NSRange range) |
513 { | 514 { |
514 NSRange result; | 515 NSRange result; |
515 OS.objc_msgSend_struct(result, this.id, OS.sel_lineRangeForRange_1, range); | 516 OS.objc_msgSend_struct(&result, this.id_, OS.sel_lineRangeForRange_1, &range); |
516 return result; | 517 return result; |
517 } | 518 } |
518 | 519 |
519 public NSComparisonResult localizedCaseInsensitiveCompare (NSString string) | 520 public NSComparisonResult localizedCaseInsensitiveCompare (NSString string) |
520 { | 521 { |
521 return cast(NSComparisonResult) OS.objc_msgSend(this.id, OS.sel_localizedCaseInsensitiveCompare_1, string !is null ? string.id : null); | 522 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_localizedCaseInsensitiveCompare_1, string !is null ? string.id_ : null); |
522 } | 523 } |
523 | 524 |
524 public NSComparisonResult localizedCompare (NSString string) | 525 public NSComparisonResult localizedCompare (NSString string) |
525 { | 526 { |
526 return cast(NSComparisonResult) OS.objc_msgSend(this.id, OS.sel_localizedCompare_1, string !is null ? string.id : null); | 527 return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_localizedCompare_1, string !is null ? string.id_ : null); |
527 } | 528 } |
528 | 529 |
529 public static NSString localizedNameOfStringEncoding (NSStringEncoding encoding) | 530 public static NSString localizedNameOfStringEncoding (NSStringEncoding encoding) |
530 { | 531 { |
531 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_localizedNameOfStringEncoding_1, encoding); | 532 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_localizedNameOfStringEncoding_1, encoding); |
533 } | 534 } |
534 | 535 |
535 public static id localizedStringWithFormat (NSString localizedStringWithFormat) | 536 public static id localizedStringWithFormat (NSString localizedStringWithFormat) |
536 { | 537 { |
537 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_localizedStringWithFormat_1, | 538 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_localizedStringWithFormat_1, |
538 localizedStringWithFormat !is null ? localizedStringWithFormat.id : null); | 539 localizedStringWithFormat !is null ? localizedStringWithFormat.id_ : null); |
539 return result !is null ? new id(result) : null; | 540 return result !is null ? new id(result) : null; |
540 } | 541 } |
541 | 542 |
542 public long longLongValue () | 543 public long longLongValue () |
543 { | 544 { |
544 return cast(long) OS.objc_msgSend(this.id, OS.sel_longLongValue); | 545 return cast(long) OS.objc_msgSend(this.id_, OS.sel_longLongValue); |
545 } | 546 } |
546 | 547 |
547 public /*const char* */byte* lossyCString () | 548 public /*const*/char* lossyCString () |
548 { | 549 { |
549 return cast(/*const char* */byte*) OS.objc_msgSend(this.id, OS.sel_lossyCString); | 550 return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_lossyCString); |
550 } | 551 } |
551 | 552 |
552 public NSString lowercaseString () | 553 public NSString lowercaseString () |
553 { | 554 { |
554 objc.id result = OS.objc_msgSend(this.id, OS.sel_lowercaseString); | 555 objc.id result = OS.objc_msgSend(this.id_, OS.sel_lowercaseString); |
555 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 556 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
556 } | 557 } |
557 | 558 |
558 public NSUInteger maximumLengthOfBytesUsingEncoding (NSStringEncoding enc) | 559 public NSUInteger maximumLengthOfBytesUsingEncoding (NSStringEncoding enc) |
559 { | 560 { |
560 return OS.objc_msgSend(this.id, OS.sel_maximumLengthOfBytesUsingEncoding_1, enc); | 561 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maximumLengthOfBytesUsingEncoding_1, enc); |
561 } | 562 } |
562 | 563 |
563 public NSRange paragraphRangeForRange (NSRange range) | 564 public NSRange paragraphRangeForRange (NSRange range) |
564 { | 565 { |
565 NSRange result; | 566 NSRange result; |
566 OS.objc_msgSend_stret(result, this.id, OS.sel_paragraphRangeForRange_1, range); | 567 OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphRangeForRange_1, range); |
567 return result; | 568 return result; |
568 } | 569 } |
569 | 570 |
570 public NSArray pathComponents () | 571 public NSArray pathComponents () |
571 { | 572 { |
572 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathComponents); | 573 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponents); |
573 return result !is null ? new NSArray(result) : null; | 574 return result !is null ? new NSArray(result) : null; |
574 } | 575 } |
575 | 576 |
576 public NSString pathExtension () | 577 public NSString pathExtension () |
577 { | 578 { |
578 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathExtension); | 579 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathExtension); |
579 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 580 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
580 } | 581 } |
581 | 582 |
582 public static NSString pathWithComponents (NSArray components) | 583 public static NSString pathWithComponents (NSArray components) |
583 { | 584 { |
584 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_pathWithComponents_1, components !is null ? components.id : null); | 585 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_pathWithComponents_1, components !is null ? components.id_ : null); |
585 return result !is null ? new NSString(result) : null; | 586 return result !is null ? new NSString(result) : null; |
586 } | 587 } |
587 | 588 |
588 public NSString precomposedStringWithCanonicalMapping () | 589 public NSString precomposedStringWithCanonicalMapping () |
589 { | 590 { |
590 objc.id result = OS.objc_msgSend(this.id, OS.sel_precomposedStringWithCanonicalMapping); | 591 objc.id result = OS.objc_msgSend(this.id_, OS.sel_precomposedStringWithCanonicalMapping); |
591 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 592 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
592 } | 593 } |
593 | 594 |
594 public NSString precomposedStringWithCompatibilityMapping () | 595 public NSString precomposedStringWithCompatibilityMapping () |
595 { | 596 { |
596 objc.id result = OS.objc_msgSend(this.id, OS.sel_precomposedStringWithCompatibilityMapping); | 597 objc.id result = OS.objc_msgSend(this.id_, OS.sel_precomposedStringWithCompatibilityMapping); |
597 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 598 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
598 } | 599 } |
599 | 600 |
600 public id propertyList () | 601 public id propertyList () |
601 { | 602 { |
602 objc.id result = OS.objc_msgSend(this.id, OS.sel_propertyList); | 603 objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyList); |
603 return result !is null ? new id(result) : null; | 604 return result !is null ? new id(result) : null; |
604 } | 605 } |
605 | 606 |
606 public NSDictionary propertyListFromStringsFileFormat () | 607 public NSDictionary propertyListFromStringsFileFormat () |
607 { | 608 { |
608 objc.id result = OS.objc_msgSend(this.id, OS.sel_propertyListFromStringsFileFormat); | 609 objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyListFromStringsFileFormat); |
609 return result !is null ? new NSDictionary(result) : null; | 610 return result !is null ? new NSDictionary(result) : null; |
610 } | 611 } |
611 | 612 |
612 public NSRange rangeOfCharacterFromSet_ (NSCharacterSet aSet) | 613 public NSRange rangeOfCharacterFromSet_ (NSCharacterSet aSet) |
613 { | 614 { |
614 NSRange result; | 615 NSRange result; |
615 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfCharacterFromSet_1, aSet !is null ? aSet.id : null); | 616 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfCharacterFromSet_1, aSet !is null ? aSet.id_ : null); |
616 return result; | 617 return result; |
617 } | 618 } |
618 | 619 |
619 public NSRange rangeOfCharacterFromSet_options_ (NSCharacterSet aSet, NSStringCompareOptions mask) | 620 public NSRange rangeOfCharacterFromSet_options_ (NSCharacterSet aSet, NSStringCompareOptions mask) |
620 { | 621 { |
621 NSRange result; | 622 NSRange result; |
622 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfCharacterFromSet_1options_1, aSet !is null ? aSet.id : null, mask); | 623 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfCharacterFromSet_1options_1, aSet !is null ? aSet.id_ : null, mask); |
623 return result; | 624 return result; |
624 } | 625 } |
625 | 626 |
626 public NSRange rangeOfCharacterFromSet_options_range_ (NSCharacterSet aSet, NSStringCompareOptions mask, NSRange searchRange) | 627 public NSRange rangeOfCharacterFromSet_options_range_ (NSCharacterSet aSet, NSStringCompareOptions mask, NSRange searchRange) |
627 { | 628 { |
628 NSRange result; | 629 NSRange result; |
629 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfCharacterFromSet_1options_1range_1, aSet !is null ? aSet.id : null, mask, searchRange); | 630 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfCharacterFromSet_1options_1range_1, aSet !is null ? aSet.id_ : null, mask, searchRange); |
630 return result; | 631 return result; |
631 } | 632 } |
632 | 633 |
633 public NSRange rangeOfComposedCharacterSequenceAtIndex (NSUInteger index) | 634 public NSRange rangeOfComposedCharacterSequenceAtIndex (NSUInteger index) |
634 { | 635 { |
635 NSRange result; | 636 NSRange result; |
636 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfComposedCharacterSequenceAtIndex_1, index); | 637 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfComposedCharacterSequenceAtIndex_1, index); |
637 return result; | 638 return result; |
638 } | 639 } |
639 | 640 |
640 public NSRange rangeOfComposedCharacterSequencesForRange (NSRange range) | 641 public NSRange rangeOfComposedCharacterSequencesForRange (NSRange range) |
641 { | 642 { |
642 NSRange result; | 643 NSRange result; |
643 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfComposedCharacterSequencesForRange_1, range); | 644 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfComposedCharacterSequencesForRange_1, range); |
644 return result; | 645 return result; |
645 } | 646 } |
646 | 647 |
647 public NSRange rangeOfString_ (NSString aString) | 648 public NSRange rangeOfString_ (NSString aString) |
648 { | 649 { |
649 NSRange result; | 650 NSRange result; |
650 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfString_1, aString !is null ? aString.id : null); | 651 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1, aString !is null ? aString.id_ : null); |
651 return result; | 652 return result; |
652 } | 653 } |
653 | 654 |
654 public NSRange rangeOfString_options_ (NSString aString, NSStringCompareOptions mask) | 655 public NSRange rangeOfString_options_ (NSString aString, NSStringCompareOptions mask) |
655 { | 656 { |
656 NSRange result; | 657 NSRange result; |
657 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfString_1options_1, aString !is null ? aString.id : null, mask); | 658 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1options_1, aString !is null ? aString.id_ : null, mask); |
658 return result; | 659 return result; |
659 } | 660 } |
660 | 661 |
661 public NSRange rangeOfString_options_range_ (NSString aString, NSStringCompareOptions mask, NSRange searchRange) | 662 public NSRange rangeOfString_options_range_ (NSString aString, NSStringCompareOptions mask, NSRange searchRange) |
662 { | 663 { |
663 NSRange result; | 664 NSRange result; |
664 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfString_1options_1range_1, aString !is null ? aString.id : null, mask, searchRange); | 665 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1options_1range_1, aString !is null ? aString.id_ : null, mask, searchRange); |
665 return result; | 666 return result; |
666 } | 667 } |
667 | 668 |
668 public NSRange rangeOfString_options_range_locale_ (NSString aString, NSStringCompareOptions mask, NSRange searchRange, NSLocale locale) | 669 public NSRange rangeOfString_options_range_locale_ (NSString aString, NSStringCompareOptions mask, NSRange searchRange, NSLocale locale) |
669 { | 670 { |
670 NSRange result; | 671 NSRange result; |
671 OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfString_1options_1range_1locale_1, aString !is null ? aString.id : null, mask, | 672 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1options_1range_1locale_1, aString !is null ? aString.id_ : null, mask, |
672 searchRange, locale !is null ? locale.id : null); | 673 searchRange, locale !is null ? locale.id_ : null); |
673 return result; | 674 return result; |
674 } | 675 } |
675 | 676 |
676 public NSStringEncoding smallestEncoding () | 677 public NSStringEncoding smallestEncoding () |
677 { | 678 { |
678 return OS.objc_msgSend(this.id, OS.sel_smallestEncoding); | 679 return cast(NSStringEncoding) OS.objc_msgSend(this.id_, OS.sel_smallestEncoding); |
679 } | 680 } |
680 | 681 |
681 public static NSString string () | 682 public static NSString string () |
682 { | 683 { |
683 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_string); | 684 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_string); |
684 return result !is null ? new NSString(result) : null; | 685 return result !is null ? new NSString(result) : null; |
685 } | 686 } |
686 | 687 |
687 public NSString stringByAbbreviatingWithTildeInPath () | 688 public NSString stringByAbbreviatingWithTildeInPath () |
688 { | 689 { |
689 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAbbreviatingWithTildeInPath); | 690 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAbbreviatingWithTildeInPath); |
690 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 691 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
691 } | 692 } |
692 | 693 |
693 public NSString stringByAddingPercentEscapesUsingEncoding (NSStringEncoding enc) | 694 public NSString stringByAddingPercentEscapesUsingEncoding (NSStringEncoding enc) |
694 { | 695 { |
695 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAddingPercentEscapesUsingEncoding_1, enc); | 696 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAddingPercentEscapesUsingEncoding_1, enc); |
696 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 697 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
697 } | 698 } |
698 | 699 |
699 public NSString stringByAppendingFormat (NSString stringByAppendingFormat) | 700 public NSString stringByAppendingFormat (NSString stringByAppendingFormat) |
700 { | 701 { |
701 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingFormat_1, | 702 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingFormat_1, |
702 stringByAppendingFormat !is null ? stringByAppendingFormat.id : null); | 703 stringByAppendingFormat !is null ? stringByAppendingFormat.id_ : null); |
703 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 704 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
704 } | 705 } |
705 | 706 |
706 public NSString stringByAppendingPathComponent (NSString str) | 707 public NSString stringByAppendingPathComponent (NSString str) |
707 { | 708 { |
708 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathComponent_1, str !is null ? str.id : null); | 709 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingPathComponent_1, str !is null ? str.id_ : null); |
709 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 710 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
710 } | 711 } |
711 | 712 |
712 public NSString stringByAppendingPathExtension (NSString str) | 713 public NSString stringByAppendingPathExtension (NSString str) |
713 { | 714 { |
714 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathExtension_1, str !is null ? str.id : null); | 715 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingPathExtension_1, str !is null ? str.id_ : null); |
715 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 716 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
716 } | 717 } |
717 | 718 |
718 public NSString stringByAppendingString (NSString aString) | 719 public NSString stringByAppendingString (NSString aString) |
719 { | 720 { |
720 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingString_1, aString !is null ? aString.id : null); | 721 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingString_1, aString !is null ? aString.id_ : null); |
721 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 722 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
722 } | 723 } |
723 | 724 |
724 public NSString stringByDeletingLastPathComponent () | 725 public NSString stringByDeletingLastPathComponent () |
725 { | 726 { |
726 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingLastPathComponent); | 727 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByDeletingLastPathComponent); |
727 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 728 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
728 } | 729 } |
729 | 730 |
730 public NSString stringByDeletingPathExtension () | 731 public NSString stringByDeletingPathExtension () |
731 { | 732 { |
732 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingPathExtension); | 733 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByDeletingPathExtension); |
733 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 734 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
734 } | 735 } |
735 | 736 |
736 public NSString stringByExpandingTildeInPath () | 737 public NSString stringByExpandingTildeInPath () |
737 { | 738 { |
738 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByExpandingTildeInPath); | 739 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByExpandingTildeInPath); |
739 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 740 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
740 } | 741 } |
741 | 742 |
742 public NSString stringByFoldingWithOptions (NSStringCompareOptions options, NSLocale locale) | 743 public NSString stringByFoldingWithOptions (NSStringCompareOptions options, NSLocale locale) |
743 { | 744 { |
744 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByFoldingWithOptions_1locale_1, options, locale !is null ? locale.id : null); | 745 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByFoldingWithOptions_1locale_1, options, locale !is null ? locale.id_ : null); |
745 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 746 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
746 } | 747 } |
747 | 748 |
748 public NSString stringByPaddingToLength (NSUInteger newLength, NSString padString, NSUInteger padIndex) | 749 public NSString stringByPaddingToLength (NSUInteger newLength, NSString padString, NSUInteger padIndex) |
749 { | 750 { |
750 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByPaddingToLength_1withString_1startingAtIndex_1, newLength, | 751 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByPaddingToLength_1withString_1startingAtIndex_1, newLength, |
751 padString !is null ? padString.id : null, padIndex); | 752 padString !is null ? padString.id_ : null, padIndex); |
752 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 753 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
753 } | 754 } |
754 | 755 |
755 public NSString stringByReplacingCharactersInRange (NSRange range, NSString replacement) | 756 public NSString stringByReplacingCharactersInRange (NSRange range, NSString replacement) |
756 { | 757 { |
757 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingCharactersInRange_1withString_1, range, | 758 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingCharactersInRange_1withString_1, range, |
758 replacement !is null ? replacement.id : null); | 759 replacement !is null ? replacement.id_ : null); |
759 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 760 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
760 } | 761 } |
761 | 762 |
762 public NSString stringByReplacingOccurrencesOfString_withString_ (NSString target, NSString replacement) | 763 public NSString stringByReplacingOccurrencesOfString_withString_ (NSString target, NSString replacement) |
763 { | 764 { |
764 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingOccurrencesOfString_1withString_1, target !is null ? target.id : null, | 765 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingOccurrencesOfString_1withString_1, target !is null ? target.id_ : null, |
765 replacement !is null ? replacement.id : null); | 766 replacement !is null ? replacement.id_ : null); |
766 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 767 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
767 } | 768 } |
768 | 769 |
769 public NSString stringByReplacingOccurrencesOfString_withString_options_range_ (NSString target, NSString replacement, NSStringCompareOptions options, | 770 public NSString stringByReplacingOccurrencesOfString_withString_options_range_ (NSString target, NSString replacement, NSStringCompareOptions options, |
770 NSRange searchRange) | 771 NSRange searchRange) |
771 { | 772 { |
772 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingOccurrencesOfString_1withString_1options_1range_1, | 773 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingOccurrencesOfString_1withString_1options_1range_1, |
773 target !is null ? target.id : null, replacement !is null ? replacement.id : null, options, searchRange); | 774 target !is null ? target.id_ : null, replacement !is null ? replacement.id_ : null, options, searchRange); |
774 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 775 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
775 } | 776 } |
776 | 777 |
777 public NSString stringByReplacingPercentEscapesUsingEncoding (NSStringEncoding enc) | 778 public NSString stringByReplacingPercentEscapesUsingEncoding (NSStringEncoding enc) |
778 { | 779 { |
779 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); | 780 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); |
780 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 781 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
781 } | 782 } |
782 | 783 |
783 public NSString stringByResolvingSymlinksInPath () | 784 public NSString stringByResolvingSymlinksInPath () |
784 { | 785 { |
785 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByResolvingSymlinksInPath); | 786 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByResolvingSymlinksInPath); |
786 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 787 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
787 } | 788 } |
788 | 789 |
789 public NSString stringByStandardizingPath () | 790 public NSString stringByStandardizingPath () |
790 { | 791 { |
791 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByStandardizingPath); | 792 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByStandardizingPath); |
792 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 793 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
793 } | 794 } |
794 | 795 |
795 public NSString stringByTrimmingCharactersInSet (NSCharacterSet set) | 796 public NSString stringByTrimmingCharactersInSet (NSCharacterSet set) |
796 { | 797 { |
797 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByTrimmingCharactersInSet_1, set !is null ? set.id : null); | 798 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByTrimmingCharactersInSet_1, set !is null ? set.id_ : null); |
798 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 799 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
799 } | 800 } |
800 | 801 |
801 public static id static_stringWithCString_ (/*const char* */byte* bytes) | 802 public static id static_stringWithCString_ (/*const*/char* bytes) |
802 { | 803 { |
803 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1, bytes); | 804 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1, bytes); |
804 return result !is null ? new NSString(result) : null; | 805 return result !is null ? new NSString(result) : null; |
805 } | 806 } |
806 | 807 |
807 public static id static_stringWithCString_encoding_ (/*const char* */byte* cString, NSStringEncoding enc) | 808 public static id static_stringWithCString_encoding_ (/*const*/char* cString, NSStringEncoding enc) |
808 { | 809 { |
809 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1encoding_1, cString, enc); | 810 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1encoding_1, cString, enc); |
810 return result !is null ? new NSString(result) : null; | 811 return result !is null ? new NSString(result) : null; |
811 } | 812 } |
812 | 813 |
813 public static NSString static_stringWithCString_length_ (/*const char* */byte* bytes, NSUInteger length) | 814 public static NSString static_stringWithCString_length_ (/*const*/char* bytes, NSUInteger length) |
814 { | 815 { |
815 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1length_1, bytes, length); | 816 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1length_1, bytes, length); |
816 return result !is null ? new NSString(result) : null; | 817 return result !is null ? new NSString(result) : null; |
817 } | 818 } |
818 | 819 |
822 return result !is null ? new NSString(result) : null; | 823 return result !is null ? new NSString(result) : null; |
823 } | 824 } |
824 | 825 |
825 public static NSString stringWith (String str) | 826 public static NSString stringWith (String str) |
826 { | 827 { |
827 char[] chars = str.dup; | 828 char[] chars = new char[str.length]; |
828 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_1length_1, chars.toStringz(), chars.length); | 829 str.getChars(0, chars.length, chars, 0); |
830 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_1length_1, toString16z(chars.toString16()), chars.length); | |
829 return result !is null ? new NSString(result) : null; | 831 return result !is null ? new NSString(result) : null; |
830 } | 832 } |
831 | 833 |
832 public static id static_stringWithContentsOfFile_ (NSString path) | 834 public static id static_stringWithContentsOfFile_ (NSString path) |
833 { | 835 { |
834 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1, path !is null ? path.id : null); | 836 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1, path !is null ? path.id_ : null); |
835 return result !is null ? new id(result) : null; | 837 return result !is null ? new id(result) : null; |
836 } | 838 } |
837 | 839 |
838 public static id static_stringWithContentsOfFile_encoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) | 840 public static id static_stringWithContentsOfFile_encoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) |
839 { | 841 { |
840 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1encoding_1error_1, path !is null ? path.id : null, enc, | 842 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1encoding_1error_1, path !is null ? path.id_ : null, enc, |
841 error); | 843 error); |
842 return result !is null ? new id(result) : null; | 844 return result !is null ? new id(result) : null; |
843 } | 845 } |
844 | 846 |
845 public static id static_stringWithContentsOfFile_usedEncoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) | 847 public static id static_stringWithContentsOfFile_usedEncoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error) |
846 { | 848 { |
847 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1usedEncoding_1error_1, path !is null ? path.id : null, | 849 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1usedEncoding_1error_1, path !is null ? path.id_ : null, |
848 enc, error); | 850 enc, error); |
849 return result !is null ? new id(result) : null; | 851 return result !is null ? new id(result) : null; |
850 } | 852 } |
851 | 853 |
852 public static id static_stringWithContentsOfURL_ (NSURL url) | 854 public static id static_stringWithContentsOfURL_ (NSURL url) |
853 { | 855 { |
854 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1, url !is null ? url.id : null); | 856 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1, url !is null ? url.id_ : null); |
855 return result !is null ? new id(result) : null; | 857 return result !is null ? new id(result) : null; |
856 } | 858 } |
857 | 859 |
858 public static id static_stringWithContentsOfURL_encoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) | 860 public static id static_stringWithContentsOfURL_encoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) |
859 { | 861 { |
860 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1encoding_1error_1, url !is null ? url.id : null, enc, | 862 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1encoding_1error_1, url !is null ? url.id_ : null, enc, |
861 error); | 863 error); |
862 return result !is null ? new id(result) : null; | 864 return result !is null ? new id(result) : null; |
863 } | 865 } |
864 | 866 |
865 public static id static_stringWithContentsOfURL_usedEncoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) | 867 public static id static_stringWithContentsOfURL_usedEncoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error) |
866 { | 868 { |
867 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1usedEncoding_1error_1, url !is null ? url.id : null, enc, | 869 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1usedEncoding_1error_1, url !is null ? url.id_ : null, enc, |
868 error); | 870 error); |
869 return result !is null ? new id(result) : null; | 871 return result !is null ? new id(result) : null; |
870 } | 872 } |
871 | 873 |
872 public static id stringWithFormat (NSString stringWithFormat) | 874 public static id stringWithFormat (NSString stringWithFormat) |
873 { | 875 { |
874 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithFormat_1, stringWithFormat !is null ? stringWithFormat.id : null); | 876 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithFormat_1, stringWithFormat !is null ? stringWithFormat.id_ : null); |
875 return result !is null ? new id(result) : null; | 877 return result !is null ? new id(result) : null; |
876 } | 878 } |
877 | 879 |
878 public static id stringWithString (NSString string) | 880 public static id stringWithString (NSString string) |
879 { | 881 { |
880 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithString_1, string !is null ? string.id : null); | 882 objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithString_1, string !is null ? string.id_ : null); |
881 return result !is null ? new id(result) : null; | 883 return result !is null ? new id(result) : null; |
882 } | 884 } |
883 | 885 |
884 public static id stringWithUTF8String (/*const*/char* nullTerminatedCString) | 886 public static id stringWithUTF8String (/*const*/char* nullTerminatedCString) |
885 { | 887 { |
887 return result !is null ? new id(result) : null; | 889 return result !is null ? new id(result) : null; |
888 } | 890 } |
889 | 891 |
890 public NSArray stringsByAppendingPaths (NSArray paths) | 892 public NSArray stringsByAppendingPaths (NSArray paths) |
891 { | 893 { |
892 objc.id result = OS.objc_msgSend(this.id, OS.sel_stringsByAppendingPaths_1, paths !is null ? paths.id : null); | 894 objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringsByAppendingPaths_1, paths !is null ? paths.id_ : null); |
893 return result !is null ? new NSArray(result) : null; | 895 return result !is null ? new NSArray(result) : null; |
894 } | 896 } |
895 | 897 |
896 public NSString substringFromIndex (NSUInteger from) | 898 public NSString substringFromIndex (NSUInteger from) |
897 { | 899 { |
898 objc.id result = OS.objc_msgSend(this.id, OS.sel_substringFromIndex_1, from); | 900 objc.id result = OS.objc_msgSend(this.id_, OS.sel_substringFromIndex_1, from); |
899 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 901 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
900 } | 902 } |
901 | 903 |
902 public NSString substringToIndex (NSUInteger to) | 904 public NSString substringToIndex (NSUInteger to) |
903 { | 905 { |
904 objc.id result = OS.objc_msgSend(this.id, OS.sel_substringToIndex_1, to); | 906 objc.id result = OS.objc_msgSend(this.id_, OS.sel_substringToIndex_1, to); |
905 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 907 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
906 } | 908 } |
907 | 909 |
908 public NSString substringWithRange (NSRange range) | 910 public NSString substringWithRange (NSRange range) |
909 { | 911 { |
910 objc.id result = OS.objc_msgSend(this.id, OS.sel_substringWithRange_1, range); | 912 objc.id result = OS.objc_msgSend(this.id_, OS.sel_substringWithRange_1, range); |
911 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 913 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
912 } | 914 } |
913 | 915 |
914 public NSString uppercaseString () | 916 public NSString uppercaseString () |
915 { | 917 { |
916 objc.id result = OS.objc_msgSend(this.id, OS.sel_uppercaseString); | 918 objc.id result = OS.objc_msgSend(this.id_, OS.sel_uppercaseString); |
917 return result is this.id ? this : (result !is null ? new NSString(result) : null); | 919 return result is this.id_ ? this : (result !is null ? new NSString(result) : null); |
918 } | 920 } |
919 | 921 |
920 public bool writeToFile_atomically_ (NSString path, bool useAuxiliaryFile) | 922 public bool writeToFile_atomically_ (NSString path, bool useAuxiliaryFile) |
921 { | 923 { |
922 return OS.objc_msgSend(this.id, OS.sel_writeToFile_1atomically_1, path !is null ? path.id : null, useAuxiliaryFile) !is null; | 924 return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1, path !is null ? path.id_ : null, useAuxiliaryFile) !is null; |
923 } | 925 } |
924 | 926 |
925 public bool writeToFile_atomically_encoding_error_ (NSString path, bool useAuxiliaryFile, NSStringEncoding enc, /*NSError** */objc.id** error) | 927 public bool writeToFile_atomically_encoding_error_ (NSString path, bool useAuxiliaryFile, NSStringEncoding enc, /*NSError** */objc.id** error) |
926 { | 928 { |
927 return OS.objc_msgSend(this.id, OS.sel_writeToFile_1atomically_1encoding_1error_1, path !is null ? path.id : null, useAuxiliaryFile, enc, | 929 return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1encoding_1error_1, path !is null ? path.id_ : null, useAuxiliaryFile, enc, |
928 error) !is null; | 930 error) !is null; |
929 } | 931 } |
930 | 932 |
931 public bool writeToURL_atomically_ (NSURL url, bool atomically) | 933 public bool writeToURL_atomically_ (NSURL url, bool atomically) |
932 { | 934 { |
933 return OS.objc_msgSend(this.id, OS.sel_writeToURL_1atomically_1, url !is null ? url.id : null, atomically) !is null; | 935 return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1, url !is null ? url.id_ : null, atomically) !is null; |
934 } | 936 } |
935 | 937 |
936 public bool writeToURL_atomically_encoding_error_ (NSURL url, bool useAuxiliaryFile, NSStringEncoding enc, /*NSError** */objc.id** error) | 938 public bool writeToURL_atomically_encoding_error_ (NSURL url, bool useAuxiliaryFile, NSStringEncoding enc, /*NSError** */objc.id** error) |
937 { | 939 { |
938 return OS.objc_msgSend(this.id, OS.sel_writeToURL_1atomically_1encoding_1error_1, url !is null ? url.id : null, useAuxiliaryFile, enc, error) !is null; | 940 return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1encoding_1error_1, url !is null ? url.id_ : null, useAuxiliaryFile, enc, error) !is null; |
939 } | 941 } |
940 | 942 |
941 } | 943 } |