#include <string.h>
void far *fmemchr (
const void far *buf, /* buffer to search */
char c, /* byte to find */
unsigned int len); /* maximum buffer length */
Description
The fmemchr function scans buf for the
character c in the first len
bytes of the buffer.
Note
This function uses far
pointers to objects and may be used in any memory model other than
Tiny Model.
Return Value
The fmemchr function returns a pointer to the character
c in buf or a null pointer if
the character was not found.
#include <string.h>
#include <stdio.h> /* for printf */
void tst_memchr (char far *src1, unsigned int len) {
void *c;
c = fmemchr (src1, 'g', len);
if (c == NULL)
printf ("'g' was not found in the buffer\n");
else
printf ("found 'g' in the buffer\n");
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.