Gets a given range of characters as bytes in a specified encoding.
Original signature is '- (BOOL)getBytes:(void *)buffer maxLength:(NSUInteger)maxBufferCount usedLength:(NSUInteger *)usedBufferCount encoding:(NSStringEncoding)encoding options:(NSStringEncodingConversionOptions)options range:(NSRange)range remainingRange:(NSRangePointer)leftover'
Available in Mac OS X v10.5 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public virtual bool GetBytesMaxLengthUsedLengthEncodingOptionsRangeRemainingRange( IntPtr buffer, NSUInteger maxBufferCount, ref NSUInteger usedBufferCount, NSStringEncoding encoding, NSStringEncodingConversionOptions options, NSRange range, ref NSRange leftover )
Public Overridable Function GetBytesMaxLengthUsedLengthEncodingOptionsRangeRemainingRange ( _ buffer As IntPtr, _ maxBufferCount As NSUInteger, _ ByRef usedBufferCount As NSUInteger, _ encoding As NSStringEncoding, _ options As NSStringEncodingConversionOptions, _ range As NSRange, _ ByRef leftover As NSRange _ ) As Boolean
public: virtual bool GetBytesMaxLengthUsedLengthEncodingOptionsRangeRemainingRange( IntPtr buffer, NSUInteger maxBufferCount, NSUInteger% usedBufferCount, NSStringEncoding encoding, NSStringEncodingConversionOptions options, NSRange range, NSRange% leftover )
Parameters
- buffer (IntPtr)
- A buffer into which to store the bytes from the receiver. The returned bytes are notNULL-terminated.
- maxBufferCount (NSUInteger)
- The maximum number of bytes to write to buffer.
- usedBufferCount (NSUInteger%)
- The number of bytes used from buffer. Pass NULL if you do not need this value.
- encoding (NSStringEncoding)
- The encoding to use for the returned bytes.
- options (NSStringEncodingConversionOptions)
- A mask to specify options to use for converting the receiver’s contents to encoding (if conversion is necessary).
- range (NSRange)
- The range of characters in the receiver to get.
- leftover (NSRange%)
- The remaining range. Pass NULL If you do not need this value.
Return Value
YES if some characters were converted, otherwise NO.
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)