Returns the number of bytes required to store the receiver in a given encoding.
Original signature is '- (NSUInteger)lengthOfBytesUsingEncoding:(NSStringEncoding)enc'
Available in Mac OS X v10.4 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public virtual NSUInteger LengthOfBytesUsingEncoding( NSStringEncoding enc )
Public Overridable Function LengthOfBytesUsingEncoding ( _ enc As NSStringEncoding _ ) As NSUInteger
public: virtual NSUInteger LengthOfBytesUsingEncoding( NSStringEncoding enc )
Parameters
- enc (NSStringEncoding)
- The encoding for which to determine the receiver's length.
Return Value
The number of bytes required to store the receiver in the encoding enc in a non-external representation. The length does not include space for a terminating NULL character. Returns 0 if the specified encoding cannot be used to convert the receiver or if the amount of memory required for storing the results of the encoding conversion would exceed NSIntegerMax.
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)