Locate character in block of memory.
Searches within the first num bytes of the block of memory pointed by ptr for the first occurrence of value (interpreted as an unsigned char), and returns a pointer to it.
- Parameters
-
ptr | Pointer to the block of memory where the search is performed. |
value | Value to be located. The value is passed as an int, but the function performs a byte per byte search using the unsigned char conversion of this value. |
num | Number of bytes to be analyzed. |
- Returns
- A pointer to the first occurrence of value in the block of memory pointed by ptr. If the value is not found, the function returns a null pointer.