MEMCHR(3) BSD Library Functions Manual MEMCHR(3)NAME
memchr -- locate byte in byte string
Standard C Library (libc, -lc)
memchr(const void *s, int c, size_t n);
The memchr() function locates the first occurrence of c (converted to an unsigned char) in string s.
The memchr() function returns a pointer to the byte located, or NULL if no such byte exists within n bytes.
SEE ALSO strchr(3), strcspn(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3), wmemchr(3)STANDARDS
The memchr() function conforms to ISO/IEC 9899:1990 (``ISO C90'').
BSD April 9, 2008 BSD
Check Out this Related Man Page
MEMCHR(3) Linux Programmer's Manual MEMCHR(3)NAME
memchr, memrchr - scan memory for a character
void *memchr(const void *s, int c, size_t n);
void *memrchr(const void *s, int c, size_t n);
The memchr() function scans the first n bytes of the memory area pointed to by s for the character c. The first byte to match c (inter-
preted as an unsigned character) stops the operation.
The memrchr() function is like the memchr() function, except that it searches backwards from the end of the n bytes pointed to by s instead
of forwards from the front.
The memchr() and memrchr() functions return a pointer to the matching byte or NULL if the character does not occur in the given memory
The memchr() function conforms to SVID 3, BSD 4.3, ISO 9899, POSIX. The memrchr() function is a GNU extension, available since glibc
SEE ALSO index(3), rindex(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3)GNU 2002-02-20 MEMCHR(3)
When Iam running c program in redhat linux 7.3 version and PCQ Linux 8.0 version, its taking around 20 seconds. But when Iam running it in HP-UX Release 11i, its taking around 3 minutes. Can anyone throw light on this.
Thanks in advance,
Praveen. (11 Replies)
I want to build a little website on a Sun Blade 100 running Solaris 10.
I just went out to apache.org and downloaded Unix Source: httpd-2.2.8.tar.gz
After unpacking the tarball, I CD'd into the subdirectory and ran the configure utility. Of course, it crapped out. I see that it is... (17 Replies)
We are moving from old solaris to new version of solaris. I have copied the gcc compiler installed on old server to new solaris server. But just copying didn't work. So I am trying to build it on the new server. The server version is
sailfish@st-kvar02 -> uname -a
SunOS st-kvar02 5.10... (7 Replies)
I am building a script to identify those files created/modified today and with file size 0. I am able to find the files with 0 file size and created/modified in last 24 hrs as shown below but not today (current date), I tried using (touch -t time filenm) but in my version of unix at work it... (7 Replies)
I've been having problems lately trying to do pattern matching in C while implementing wildcards. Take for instance the following code:
#include <string.h> ... (14 Replies)
We meet errors while running configuration scripts to prepare compiling source code on AIX 7.2. This error does not happen on AIX5.3 and AIX6.1
With the “/usr/bin/sh” from AIX7.2, sometimes , the script runs sucessfully, sometimes not. It’s unstable, and I don’t know why.
When... (10 Replies)