|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
_memicmp, _memicmp_l
int _memicmp( const void *buf1, const void *buf2, size_t count ); int _memicmp_l( const void *buf1, const void *buf2, size_t count, _locale_t locale );
|
|
|
|---|---|
|
_memicmp |
|
|
_memicmp_l |
|
// crt_memicmp.c
// This program uses _memicmp to compare
// the first 29 letters of the strings named first and
// second without regard to the case of the letters.
#include <memory.h>
#include <stdio.h>
#include <string.h>
int main( void )
{
int result;
char first[] = "Those Who Will Not Learn from History";
char second[] = "THOSE WHO WILL NOT LEARN FROM their mistakes";
// Note that the 29th character is right here ^
printf( "Compare '%.29s' to '%.29s'\n", first, second );
result = _memicmp( first, second, 29 );
if( result < 0 )
printf( "First is less than second.\n" );
else if( result == 0 )
printf( "First is equal to second.\n" );
else if( result > 0 )
printf( "First is greater than second.\n" );
}
Comparez « ceux qui n'apprendra pas » aux « CES OMS APPRENDRA NOT FROM »
est d'abord égal au deuxième. Non applicable. Pour appeler la fonction C standard, utilisez PInvoke. Pour plus d'informations, consultez l' exemples d'appel de code non managé.