Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
wcsncmp(3) OSS 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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
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 first wide-character string.
wcstring2 Points to a location that contains the second wide-character string.
number Specifies 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 specified 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).
8−18 Hewlett-Packard Company 527187-017