Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/string/wide/wmemcmp"

From cppreference.com
< cpp‎ | string‎ | wide
m (Text replace - "{{cpp|" to "{{c|")
(+see c)
Line 14: Line 14:
  
 
===Return value===
 
===Return value===
 
+
Negative value if {{tt|lhs}} is ''less than'' {{tt|rhs}}.
negative value if {{tt|lhs}} is ''less than'' {{tt|rhs}}.
+
  
 
{{c|0}} if {{tt|lhs}} is ''equal to'' {{tt|rhs}}.
 
{{c|0}} if {{tt|lhs}} is ''equal to'' {{tt|rhs}}.
  
positive value if {{tt|lhs}} is ''greater than'' {{tt|rhs}}.
+
Positive value if {{tt|lhs}} is ''greater than'' {{tt|rhs}}.
  
 
===Example===
 
===Example===
Line 32: Line 31:
 
{{dcl list template | cpp/string/wide/dcl list wcscmp}}
 
{{dcl list template | cpp/string/wide/dcl list wcscmp}}
 
{{dcl list template | cpp/string/wide/dcl list wcsncmp}}
 
{{dcl list template | cpp/string/wide/dcl list wcsncmp}}
 +
{{dcl list see c | c/string/wide/wmemcmp}}
 
{{dcl list end}}
 
{{dcl list end}}

Revision as of 06:50, 14 May 2012

Template:cpp/string/wide/sidebar

Defined in header <cwchar>
int wmemcmp( const wchar_t* lhs, const wchar_t* rhs, std::size_t count );

Compares the first count wide characters of the objects pointed to by lhs and rhs. The comparison is done lexicographically.

Contents

Parameters

lhs, rhs - pointers to the memory buffers to compare
count - number of bytes to examine

Return value

Negative value if lhs is less than rhs.

0 if lhs is equal to rhs.

Positive value if lhs is greater than rhs.

Example

See also

Template:cpp/string/wide/dcl list wcscmpTemplate:cpp/string/wide/dcl list wcsncmp
C documentation for wmemcmp