memicmp

UNIX-specific C function - not part of ANSI C

Syntax

int memicmp(void *mem1, void *mem2, int n)

Arguments

mem1
The first memory block to compare
mem2
The second memory block, to be compared with mem1
n
The size (in bytes) of the memory blocks to compare

Return

Returns 0 if the two memory blocks are identical. Otherwise, it returns a negative or positive integer depending on whether the value of the data in mem1 is found to be "less than" or "greater than" the value of the data in mem2.

Description

memicmp performs a byte-wise and case insensitive comparison of two memory blocks, to determine if they contain the same string data.

Comment

On Microsoft systems, this function is usually called via _memicmp instead (note the leading underscore).

See Also

memcmp, strcmp, stricmp, strncmp