Function _conCompareStr() Foundation
Compares two strings up to the specified length.
LONG _conCompareStr(char *ps1, ULONG nlen1,
char *ps2, ULONG nlen2);
A negative value is returned when ps1 < ps2. NULL is returned when ps1 = ps2. A positive value is returned if ps1 > ps2.
This function compares two strings and incorporates the current values of SET EXACT and SET LEXICAL. Each string can contain any characters including NULL characters.
/*
Compare two NULL terminated strings
*/
#include <xppcon.h>
#include <string.h>
XPPAPIRET xr;
CHAR *ps1, ps2;
/*
Initialize string pointers ...
*/
xr = _conCompareStr( ps1, strlen(ps1), ps2, strlen(ps2) );
if (xr < 0)
/* ps1 less than ps2 ... */
else if (xr > 0)
/* ps1 greater than ps2 ... */
else
/* ps1 equal to ps2 ... */
/*
Release of string pointers ...
*/
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.