Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

wcsncmp(3) Guardian Native C Library Calls Reference Manual
NAME
wcsncmp - Compares wide-character strings with a character count
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 wcsncmp(
const wchar_t *wcstring1,
const wchar_t *wcstring2,
size_t number);
PARAMETERS
wcstring1 Points to a location that contains the rst wide-character string.
wcstring2 Points to a location that contains the second wide-character string.
number Species the maximum number of wide characters to compare.
DESCRIPTION
The wcsncat( ), wcsncmp(), and wcsncpy() functions operate on null-terminated, wide-
character strings.
The wcsncmp() function compares the wide characters in the wcstring1 parameter to the
wcstring2 parameter. The wcsncmp() function compares wide characters until it has compared
number wide characters or until it has reached a terminating null wide character. The function
compares at most the number of wide characters specied by the value of the number parameter.
The wcsncmp() function compares strings based on the machine collating order. It does not use
the locale-dependent sorting order. Use the wcscoll() function for locale-dependent sorting.
RETURN VALUES
Upon successful completion, the wcsncmp() 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).
RELATED INFORMATION
Functions: strncat(3) wcschr(3), wcscmp(3), wcscpy(3), wcscspn(3), wcsncat(3), wcsncpy(3).
768 Hewlett-Packard Company 527192-007