MEMCHR(3) BSD Library Functions Manual MEMCHR(3)NAME
memchr, memrchr -- locate byte in byte string
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h>
void *
memchr(const void *b, int c, size_t len);
void *
memrchr(const void *b, int c, size_t len);
DESCRIPTION
The memchr() function locates the first occurrence of c (converted to an unsigned char) in string b. The memrchr() function locates the last
occurrence of c (converted to an unsigned char) in string b.
RETURN VALUES
The memchr() and memrchr() functions return a pointer to the byte located, or NULL if no such byte exists within len bytes.
SEE ALSO index(3), rindex(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3)STANDARDS
The memchr() function conforms to ANSI X3.159-1989 (``ANSI C89'').
BSD April 10, 2009 BSD
Check Out this Related Man Page
MEMCHR(3) Linux Programmer's Manual MEMCHR(3)NAME
memchr, memrchr - scan memory for a character
SYNOPSIS
#include <string.h>
void *memchr(const void *s, int c, size_t n);
void *memrchr(const void *s, int c, size_t n);
DESCRIPTION
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.
RETURN VALUE
The memchr() and memrchr() functions return a pointer to the matching byte or NULL if the character does not occur in the given memory
area.
CONFORMING TO
The memchr() function conforms to SVID 3, BSD 4.3, ISO 9899, POSIX. The memrchr() function is a GNU extension, available since glibc
2.1.91.
SEE ALSO index(3), rindex(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3)GNU 2002-02-20 MEMCHR(3)
Hi Friends,
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)
hi,
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 <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h> ... (14 Replies)
Hi
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)