Converts the receiver’s content to a given encoding and stores them in a buffer.
Original signature is '- (BOOL)getCString:(char *)buffer maxLength:(NSUInteger)maxBufferCount encoding:(NSStringEncoding)encoding'
Available in Mac OS X v10.4 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public virtual bool GetCStringMaxLengthEncoding( IntPtr buffer, NSUInteger maxBufferCount, NSStringEncoding encoding )
Public Overridable Function GetCStringMaxLengthEncoding ( _ buffer As IntPtr, _ maxBufferCount As NSUInteger, _ encoding As NSStringEncoding _ ) As Boolean
public: virtual bool GetCStringMaxLengthEncoding( IntPtr buffer, NSUInteger maxBufferCount, NSStringEncoding encoding )
Parameters
- buffer (IntPtr)
- Upon return, contains the converted C-string plus the NULL termination byte. The buffer must include room for maxBufferCount bytes.
- maxBufferCount (NSUInteger)
- The maximum number of bytes in the string to return in buffer (including the NULL termination byte).
- encoding (NSStringEncoding)
- The encoding for the returned C string.
Return Value
YES if the operation was successful, otherwise NO. Returns NO if conversion is not possible due to encoding errors or if buffer is too small.
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)