2.1.2.30 memchr


Description

Find a pointer to first occurrence of character.

Syntax

LPVOID memchr( LPCVOID buf, int c, size_t count )

Parameters

buf
[input] Buffer to search in
c
[input] Character to search for
count
[input] Number of characters to search in buffer

Return

Returns a pointer to first occurrence of character.

Examples

EX1

void memchr_ex1()
{
    char * pChar;
    char str1[] = "Mississippi";
    pChar=(char*) memchr(str1, 's', lstrlen(str1));
    out_str(pChar); // output "ssissippi"
}

Remark

Find a pointer to first occurrence of character.

See Also

Header to Include

origin.h

Reference