Share EncyclopediaHome EncyclopediaCategories Switch Channel

2026-02-17 08:081900NameNetworking

Compares the string。

Important

Mbscmp and mbscmp l cannot be used for applications that are being implemented while windows is running. For details, please refer to the crt function that is not supported in the application of the universal windows platform。

Syntax:

Int sstrcmp()
coI'm sorry. Co♪ i'm so sorry ♪
;
int wcsmp()
coIt's the first time i've ever seen you. Co*st wchar t *string2
;
int mbscmp()
coI'm sorry, sir. Co♪ and now unsigned char ♪
;
int mbscmp l
coI'm sorry, sir. CoI don't know. Locale t locale
;

Parameters

# i don't know #

The string that you want to compare the null terminated。

I'm sorry, locale

The area settings you want to use。

Return value

Wcscmp principles

The return values of these functions indicate a serial number relationship between string1 and string2。

Relationship of valuestring1 to string2

String1 is less than string2。

String1 equals string2

> 0

String1 greater than string2

Wcscmp principles

Mbscmp and mbscmp l return nlscmperro when the parameter verification error is in and mbscmp l。

Notes

The stcmp function compares the serial numbers of string1 and string2 and returns a value that indicates their relationship. Wcscmp and mbscmp are wide and multi-bytes versions of stcmp, respectively. Mbsmp recognizes multi-byte character sequences according to the current multi-byte code page and returns nlscmperro when an error occurs. Mbsmp l has the same behaviour, but uses the input area setting parameters instead of the current area setting. For more information, please refer to the code page. Similarly, if string1 or string2 is empty, mbscmp calls the invalid parameter processor, as described in the parameter validation. If continued, mbscmp and mbscmp l return nlscmperro and set erno as einval. Strcmp and wcsmp will not verify its parameters. Otherwise these functions have the same behaviour。

By default, this function is limited to an application. To change this behaviour, see the global state in crt。

General text routine map tchar. H routine unicode and mbcs is not defined mbcs defined unicode

Tcscmp

Strcmp

Mbsmp

Wcscmp

Wcscmp principles

The stcmp function differs from strcoll in that the stcmp comparison is sequential and independent of the area settings. Strcoll compares strings by using the dictionary order of the lc collate category currently set in the area. For more information about the lc collate category, see setlocale, wsetlocale。

In the " c " area settings, the character order in the character set (ascii charset) is the same as in the dictionary. In other regional settings, however, the character order of the character concentration may differ from that in the dictionary. For example, in some european regional settings, the character 'a ' (value 0x61) of the character concentration is before the character 'ä ' (value 0xe4) but in the dictionary order the character 'ä ' is before the character 'a ' 。

In the area settings where character sets and dictionaries are different, you can compare dictionaries by using stcoll (rather than stcmp). Alternatively, you can use stxfrm for the original string, and then stcmp for the result string。

The stcmp function is case-sensitive. Stricmp, wcsicmp and mbsicmp converts them to lowercase before comparing strings. The two strings containing the characters “z” and “a” in the ascii table (“^”), “ ” and “`” will be compared differently, depending on their size. For example, if lowercase form is preferred, the two strings of “abcde” and “abcd^” will be compared in one way (“abcde” > “abcd^”) and, if upper case, in another way (“abcde”)

# i don't know #

Strcoll function

Like 0
Report
Favorite 0
Tip 0
Comment 0
Share 1
MoreRelated Comments
No comments yet, be the first to comment
Activate the electromagnetic valve of the gas heater
As society evolves, most urban households use gas heaters. It is easy and fast to provide hot water at all times, and even in the winter it can be comfortable to bathe at home, wash its faces, wash its vegetables, cook, etc. And we all know that the electromagnetic valve is one of the most important components of the gas heater. The electromagnetic valves of the gas heater are mainly used to control the combustion of the gas heater. So what's the

0评论2026-08-13169

What's an infectious endometriosis
First page -cardiovascular disease -infective endocrinitis -what is the infective endocardia? RinWhat's an infectious endometriosisInfective endometriitis (infective endocarditis) is defined as the inflammation of the heart valve or inner membrane caused by direct infections of bacteria, fungi and other micro-organisms (e. G. Viruses, ricksels, chlamydia, spirals, etc.), as distinct from non-infective endometriitis due to rheumatism, rheumatism,

0评论2026-08-13142