Returns an initialized NSString object that contains a given number of bytes from a given buffer of bytes interpreted in a given encoding, and optionally frees the buffer.
Original signature is '- (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)flag'
Available in Mac OS X v10.3 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public NSString( IntPtr bytes, NSUInteger length, NSStringEncoding encoding, bool flag )
Public Sub New ( _ bytes As IntPtr, _ length As NSUInteger, _ encoding As NSStringEncoding, _ flag As Boolean _ )
public: NSString( IntPtr bytes, NSUInteger length, NSStringEncoding encoding, bool flag )
Parameters
- bytes (IntPtr)
- A buffer of bytes interpreted in the encoding specified by encoding.
- length (NSUInteger)
- The number of bytes to use from bytes.
- encoding (NSStringEncoding)
- The character encoding of bytes.
- flag (Boolean)
- If YES, the receiver frees the memory when it no longer needs the data; if NO it won’t.
Return Value
An initialized NSString object containing length bytes from bytes interpreted using the encoding encoding. The returned object may be different from the original receiver.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)