CFStringGetMaximumSizeForEncodingHeader: CFString.h

Obtains the maximum number of bytes a string of a specified length (in Unicode characters) will take up if encoded in a specified encoding. The number of bytes that the encoding ends up requiring could be less.

CFIndex CFStringGetMaximumSizeForEncoding (
    CFIndex length, 
    CFStringEncoding encoding
);
length

Pass an integer of type CFIndex that specifies the number of Unicode characters to evaluate.

encoding

Pass an enum constant of type CFStringEncoding that specifies a string encoding for the number of characters specified by length.

function result

An integer specifying the maximum number of bytes the specific encoding will require for the given number of Unicode characters.


© 1999 Apple Computer, Inc. — (Last Updated 9/15/99)