Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE int32_t U_EXPORT2 ucasemap_utf8FoldCase ( const UCaseMap csm,
char *  dest,
int32_t  destCapacity,
const char *  src,
int32_t  srcLength,
UErrorCode pErrorCode 
)

Case-fold the characters in a UTF-8 string. Case-folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'I' in CaseFolding.txt. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.

Parameters:
csm UCaseMap service object.
dest A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure.
destCapacity The size of the buffer (number of bytes). If it is 0, then dest may be NULL and the function will only return the length of the result without writing any of the result string.
src The original string.
srcLength The length of the original string. If -1, then src must be NUL-terminated.
pErrorCode Must be a valid pointer to an error code value, which must not indicate a failure before the function call.
Returns:
The length of the result string, if successful - or in case of a buffer overflow, in which case it will be greater than destCapacity.
See also:
u_strFoldCase

ucasemap_setOptions

U_FOLD_CASE_DEFAULT

U_FOLD_CASE_EXCLUDE_SPECIAL_I ICU 3.8

Definition at line 566 of file ucasemap.c.

                                              {
    return caseMap(csm,
                   (uint8_t *)dest, destCapacity,
                   (const uint8_t *)src, srcLength,
                   FOLD_CASE, pErrorCode);
}


Generated by  Doxygen 1.6.0   Back to index