Functions Related to UTF-8
Chapter
15
Function Reference
483
•
0
if the two string are identical, ignoring case.
•
A negative number if
s1
is after
s0
.
Description
The function takes two UTF-8 strings (s0, s1) of unsigned char to be compared. The
comparison rules are as follows:
•
If both UTF-8 strings are NULL or zero-length, 0 is returned.
•
If one of the strings is NULL or zero-length, the NULL/zero-length string is
smaller.
•
If one or both of the strings are not UTF-8, system provided
strcasecmp
is
used.
•
If one of the two strings contains no 8-bit characters,
strcasecmp
is used.
•
The strings are compared after converted to lower-case UTF-8.
•
Each character is compared from the beginning.
Evaluation occurs in this order:
•
If the length of one character is shorter then the other, the difference of the two
lengths is returned.
•
If the length of the corresponding characters is the same, each byte in the
characters is compared.
•
If there is a difference between two bytes, the difference is returned.
•
If one string is shorter then the other, the difference is returned.
Do not use this function for collation as there’s no notion of locale in this function;
it’s UTF-8 code order, which is different from the locale based collation.
slapi_UTF8CASECMP()
Compares two UTF-8 strings.
Syntax
#include “slapi-plugin.h”
int slapi_UTF8CASECMP(char *s0, char *s1);
Summary of Contents for NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Page 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Page 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...