/*++ /* NAME /* casefold 3 /* SUMMARY /* casefold text for caseless comparison /* SYNOPSIS /* #include <stringops.h> /* /* char *casefold( /* VSTRING *dst, /* const char *src) /* /* char *casefold_append( /* VSTRING *dst, /* const char *src) /* /* char *casefold_len( /* VSTRING *dst, /* const char *src, /* ssize_t src_len) /* AUXILIARY FUNCTIONS /* char *casefoldx( /* int flags, /* VSTRING *dst, /* const char *src, /* ssize_t src_len) /* DESCRIPTION /* casefold() converts text to a form that is suitable for /* caseless comparison, rather than presentation to humans. /* /* When compiled without EAI support or util_utf8_enable is /* zero, casefold() implements ASCII case folding, leaving /* non-ASCII byte values unchanged. /* /* When compiled with EAI support and util_utf8_enable is /* non-zero, casefold() implements UTF-8 case folding using /* the en_US locale, as recommended when the conversion result /* is not meant to be presented to humans. /* /* casefold_len() implements casefold() with a source length /* argument. /* /* casefold_append() implements casefold() without overwriting /* the result. /* /* casefoldx() implements a more complex API that implements /* all of the above and more. /* /* Arguments: /* .IP src /* Null-terminated input string. /* .IP dest /* Output buffer, null-terminated. Specify a null pointer to /* use an internal buffer that is overwritten upon each call. /* .IP src_len /* The string length, -1 to determine the length dynamically. /* .IP flags /* Bitwise OR of zero or more of the following: /* .RS /* .IP CASEF_FLAG_UTF8 /* Enable UTF-8 support. This flag has no effect when compiled /* without EAI support. /* .IP CASEF_FLAG_APPEND /* Append the result to the buffer, instead of overwriting it. /* DIAGNOSTICS /* All errors are fatal. There appear to be no input-dependent /* errors. /* /* With the ICU 4.8 library, there is no casefold error for /* UTF-8 code points U+0000..U+10FFFF (including surrogate /* range), not even when running inside an empty chroot jail. /* Nor does malformed UTF-8 trigger errors; non-UTF-8 bytes /* are copied verbatim. Based on ICU 4.8 source-code review /* and experimentation(!) we conclude that UTF-8 casefolding /* has no data-dependent error cases, and that it is safe to /* treat all casefolding errors as fatal runtime errors. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.