strcmp
- Updated2023-02-21
- 1 minute(s) read
strcmp
int strcmp (const char string1[], const char string2[]);
Purpose
Compares two NUL-terminated strings. The comparison is based upon the value of the characters in the strings. Each character is interpreted as an unsigned char. The comparison is case-sensitive.
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. |
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 which are
interpreted as unsigned chars in the two strings. The comparison is
case-sensitive. The following explains the possible return values:
|
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later