Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
Guardian Native C Library Calls (t - z) wmemcmp(3)
NAME
wmemcmp - Compare wide characters in memory
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <wchar.h>
int wmemcmp(
const wchar_t *ws1,
const wchar_t *ws2,
size_t n);
PARAMETERS
ws1 Points to the location of a destination string.
ws2 Points to the location of a source string.
n Specifies the number of wide characters to compare.
DESCRIPTION
The wmemcmp() function operates on wide-character strings in memory areas. A memory area
is a group of contiguous wide characters bound by a count and not terminated by a null character.
The behavior of this function is not affected by locale and all wchar_t characters are treated
identically; the null wide character and wchar_t values not corresponding to valid characters are
not treated specially.
The wmemcmp() function compares the first n wide characters, which are wchar_t, of the string
pointed to by the ws1 parameter with the first n wide characters (also wchar_t) of the string
pointed to by the ws2 parameter.
NOTES
The wmemcmp() function uses native wide-character comparison, which might have signed
values on some machines.
If n is 0 (zero), ws1 and ws2 must be valid pointers; in this instance, the function behaves as if the
contents of the two locations are equal.
RETURN VALUES
The wmemcmp() function returns one of the following values:
Less than 0 When ws1 is less than ws2
Equal to 0 When ws1 is equal to ws2
Greater than 0 When ws1 is greater than ws2
RELATED INFORMATION
Functions: wmemchr(3), wmemcpy(3), wmemmove(3), wmemset(3).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specification and conforms with the Single
UNIX Specification, Version 2.
527192-007 Hewlett-Packard Company 7−101