1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
6 .\" all rights reserved.
7 .\" Translated 1997-12-16, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
8 .\" Updated & Modified 2002-03-24, Yuichi SATO <ysato@h4.dion.ne.jp>
9 .\" Updated & Modified 2003-11-27, Yuichi SATO <ysato444@yahoo.co.jp>
10 .\" Updated 2008-08-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
12 .\" Permission is granted to make and distribute verbatim copies of this
13 .\" manual provided the copyright notice and this permission notice are
14 .\" preserved on all copies.
16 .\" Permission is granted to copy and distribute modified versions of this
17 .\" manual under the conditions for verbatim copying, provided that the
18 .\" entire resulting derived work is distributed under the terms of a
19 .\" permission notice identical to this one.
21 .\" Since the Linux kernel and libraries are constantly changing, this
22 .\" manual page may be incorrect or out-of-date. The author(s) assume no
23 .\" responsibility for errors or omissions, or for damages resulting from
24 .\" the use of the information contained herein. The author(s) may not
25 .\" have taken the same level of care in the production of this manual,
26 .\" which is licensed free of charge, as they might when working
29 .\" Formatted or processed versions of this manual, if unaccompanied by
30 .\" the source, must acknowledge the copyright and authors of this work.
32 .\" Modified Mon Apr 12 12:49:57 1993, David Metcalfe
33 .\" Modified Sat Jul 24 18:56:22 1993, Rik Faith (faith@cs.unc.edu)
34 .\" Modified Wed Feb 20 21:09:36 2002, Ian Redfern (redferni@logica.com)
35 .\" 2008-07-09, mtk, add rawmemchr()
37 .TH MEMCHR 3 2009-12-04 "" "Linux Programmer's Manual"
39 memchr, memrchr, rawmemchr \- ʸ»ú¤òõ¤¹¤¿¤á¤Ë¥á¥â¥ê¤ò¥¹¥¥ã¥ó¤¹¤ë
42 .B #include <string.h>
44 .BI "void *memchr(const void *" s ", int " c ", size_t " n );
46 .BI "void *memrchr(const void *" s ", int " c ", size_t " n );
48 .BI "void *rawmemchr(const void *" s ", int " c );
52 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
53 .RB ( feature_test_macros (7)
62 ´Ø¿ô¤Ï¡¢¥Ý¥¤¥ó¥¿ \fIs\fP ¤¬»Ø¤·¼¨¤¹¥á¥â¥ê¥Ö¥í¥Ã¥¯¤Î
63 ÀèƬ¤Î \fIn\fP ¥Ð¥¤¥È¤«¤éʸ»ú \fIc\fP ¤òõ¤¹¡£
64 ºÇ½é¤Ë \fIc\fP (unsigned char ¤È²ò¼á¤µ¤ì¤ë) ¤¬¸«¤Ä¤«¤Ã¤¿»þÅÀ¤ÇÆ°ºî¤¬Ää»ß¤¹¤ë¡£
70 ÀèƬ¤«¤é½çÊý¸þ¤Ëõ¤¹¤Î¤Ç¤Ï¤Ê¤¯¡¢
71 ¥Ý¥¤¥ó¥¿ \fIs\fP ¤¬»Ø¤·¼¨¤¹ \fIn\fP ¥Ð¥¤¥È¤Î¥á¥â¥ê¥Ö¥í¥Ã¥¯¤Î
72 ËöÈø¤«¤éµÕ¸þ¤¤Ëõ¤¹¡£
82 Æâ¤Î¤É¤³¤«¤Ë¤¢¤ë¤³¤È¤òÁ°Äó¤Ë¤·¤Æ
83 (¤Ä¤Þ¤ê¡¢¥×¥í¥°¥é¥Þ¤Ï¤½¤Î¤³¤È¤òÃΤäƤ¤¤ë)¡¢
87 (¤¹¤Ê¤ï¤Á¡¢½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤Î¥Á¥§¥Ã¥¯¤â¹Ô¤ï¤ì¤Ê¤¤¤·¡¢
88 ¸¡º÷ÈϰϤξå¸Â¤ò¼¨¤¹°ú¤¿ô
97 ¤Ïʸ»úÎóËöÈø¤ò±Û¤¨¤Æ¸¡º÷¤ò¼Â¹Ô¤¹¤ë¤«¤â¤·¤ì¤º¡¢·ë²Ì¤ÏÉÔÄê¤Ç¤¢¤ë¡£
98 ¼¡¤Ë¼¨¤¹¸Æ¤Ó½Ð¤·¤Ï¡¢Ê¸»úÎó½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤Î°ÌÃÖ¤òÆÃÄꤹ¤ë
103 char *p = rawmemchr(s,\ \(aq\\0\(aq);
110 ´Ø¿ô¤Ï°ìÃפ¹¤ëʸ»ú¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤·¡¢
111 ¤â¤·Ê¸»ú¤¬»ØÄê¥á¥â¥êÎΰè¤Ë¸½¤ì¤Ê¤¤¾ì¹ç¤Ï NULL ¤òÊÖ¤¹¡£
114 ´Ø¿ô¤Ï¥Þ¥Ã¥Á¤¹¤ë¥Ð¥¤¥È¤¬¸«¤Ä¤«¤Ã¤¿¾ì¹ç¤Ï¥Þ¥Ã¥Á¤·¤¿¥Ð¥¤¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
115 ¥Þ¥Ã¥Á¤¹¤ë¥Ð¥¤¥È¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¡¢·ë²Ì¤ÏÉÔÄê¤Ç¤¢¤ë¡£
118 ¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
121 ¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.2 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
124 ´Ø¿ô¤Ï SVr4, 4.3BSD, C89, C99, POSIX.1-2001 ¤Ë½àµò¤¹¤ë¡£
127 ´Ø¿ô¤Ï GNU ³ÈÄ¥¤Ç¤¢¤ê¡¢glibc 2.1.91 ¤«¤é»ÈÍѲÄǽ¤Ç¤¢¤ë¡£
130 ´Ø¿ô¤Ï GNU ³ÈÄ¥¤Ç¤¢¤ê¡¢glibc 2.1 ¤«¤é»ÈÍѲÄǽ¤Ç¤¢¤ë¡£