The ifx_gl_case_conv_outbuflen() function
The ifx_gl_case_conv_outbuflen() function calculates an approximation of the number of bytes required to store a case-converted multibyte character.
Syntax
#include <ifxgls.h>
...
int ifx_gl_case_conv_outbuflen(src_mbs_bytes)
int src_mbs_bytes;
- src_mbs_bytes
- The integer number of bytes in the buffer of multibyte characters to be case converted.
Valid in client application | Valid in DataBlade® UDR |
---|---|
Yes | Yes |
Usage
The ifx_gl_case_conv_outbuflen() function
returns one of the following values:
- The exact number of bytes that a buffer of case-equivalent multibyte characters requires
- A close over-approximation of this number of bytes
This buffer can contain one or more multibyte characters. This function applies to both uppercase and lowercase conversions.
Use this function to determine whether case conversion of multibyte characters can be performed in place. If the value that this function returns is not equal to src_mbs_bytes, case conversion of multibyte characters cannot be performed in place. You must allocate a separate multibyte destination buffer. However, if the value that this function returns is exactly equal to src_mbs_bytes, multibyte case conversion can be performed in place.
Tip: This
function does not apply to wide-character case conversions.
Return values
- >0
- The number of bytes required to store multibyte characters of length src_mbs_bytes after they have been converted to either lowercase or uppercase characters.
- 0
- The function was not successful.