logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

memmem - search for memory block inside another memory block

Author

       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib                                        C Programmer's Manual                                 MEMMEM(3pub)

Description

memmem searches for the pattern pat (length patsize bytes) in the memory block v (length size bytes).

Name

       memmem - search for memory block inside another memory block

Return Value

memmem  returns  a pointer to the first byte of the first occurrence it finds, or NULL if it doesn't find
       any occurrence.

See Also

publib(3), memrmem(3), strstr(3), strrstr(3)

Synopsis

       #include <publib.h>
       void *memmem(const void *v, size_t size,
                      const void *pat, size_t patsize);

See Also