Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>memchr</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
memchr
======

Syntax
------

     #include <string.h>
     
     void *memchr(const void *string, int ch, size_t num);

Description
-----------

This function searches NUM bytes starting at STRING, looking for the
first occurence of CH.

Return Value
------------

A pointer to the first match, or `NULL' if it wasn't found.

Example
-------

     if (memchr(path, '/', strlen(path))
       do_slash();


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson