memchr
- Updated2023-02-21
- 1 minute(s) read
memchr
void *memchr (const void *buffer, int charToFind, size_t numberOfBytes);
Purpose
Locates the first occurrence of the specified character in a given memory block.
Parameters
Input | ||
Name | Type | Description |
buffer | const void * | Contains a pointer to the memory block that is searched for the specified character. |
charToFind | int | Contains the character for which to search in the specified memory block. The input to this parameter must be a character with integer value between 0 and 255. |
numberOfBytes | size_t | Specifies the maximum number of bytes that are searched for the specified character. |
Return Value
Name | Type | Description |
matchedByte | void * | Contains a pointer to the located character in the memory block or a NULL pointer if the character is not found. |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later