LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

_mbsnbicmp

_mbsnbicmp

int _mbsnbicmp (const char string1[], const char string2[], size_t maxBytes);

Purpose

Compares not more than a specified amount of bytes of two NUL-terminated strings. The comparison is based upon the value of the characters in the strings as determined by the system's language settings. The comparison is case-insensitive.

Note Note  Characters that follow an ASCII NUL byte are not compared.

Refer to the Programming for Multibyte Character Sets in LabWindows/CVI topic for information about working with multibyte character sets.

Parameters

Input
Name Type Description
string1 const char [] Contains a pointer to the string that is compared to string2.
string2 const char [] Contains a pointer to the string that is compared to string1.
maxBytes size_t Specifies the maximum number of bytes to compare between the two specified strings.
Note Note  If a part of a multibyte character lies beyond this limit, the character is not included in the comparison. Characters after an ASCII NUL byte are not compared.

Return Value

Name Type Description
comparisonResult int Contains the result of the comparison between the two specified strings. The comparison is based on the value of the characters in the two strings as determined by the system's language settings. The comparison is case-insensitive. The following explains the possible return values:
Result Description
Positive integer Indicates string1 is greater than string2
Zero Indicates string1 is equal to string2
Negative integer Indicates string1 is less than string2

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later

Was this information helpful?

Previous

_mbsicmp

Previous

_mbsicmp