Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
wcscmp(3) Guardian Native C Library Calls Reference Manual
NAME
wcscmp - Compares wide-character strings
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <wchar.h>
int wcscmp(
const wchar_t *wcstring1,
const wchar_t *wcstring2);
PARAMETERS
wcstring1 Points to a location containing the first wide-character string.
wcstring2 Points to a location containing the second wide-character string.
DESCRIPTION
The wcscat( ), wcscmp(), and wcscpy() functions operate on null-terminated, wide-character
strings. The string arguments to these functions are expected to contain a null wide character
marking the end of the string. Boundary checking is not done when a copy or concatenation
operation is performed.
The wcscmp() function compares two wchar_t strings. The wcscmp() function compares wide
characters until it finds two wide characters that are not equal or until it has reached a terminat-
ing null wide character.
The wcscmp() function compares strings based on the machine collating order. It does not use
the locale-dependent sorting order. Use the wcscol() function for locale-dependent sorting.
RETURN VALUES
Upon successful completion, the wcscmp( ) function returns an integer whose value is greater
than 0 (zero) if wcstring1 is greater than wcstring2, returns 0 (zero) if the strings are equivalent,
and returns an integer whose value is less than 0 (zero) if wcstring1 is less than wcstring2.
When a successful comparison cannot be made, this function returns a value of 0 (zero). The
sign of a nonzero return value is determined by the sign of the difference between the values of
the first pair of wide-character codes that differ in the objects being compared.
RELATED INFORMATION
Functions: strcat(3), strcmp(3), strcpy(3), wcscat(3), wcschr(3), wcscoll(3), wcscpy(3),
wcsncat(3), wcscspn(3).
7−54 Hewlett-Packard Company 527192-005