memmem

Autres langues

Langue: ja

Version: 1998-01-13 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

̾Á°

memmem - Éôʬʸ»úÎó¤Î°ÌÃÖ¤ò¼¨¤¹

½ñ¼°


#define _GNU_SOURCE


#include <string.h> void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen);

ÀâÌÀ

memmem() ´Ø¿ô¤Ï¡¢ haystacklen ¤ÎÂ礭¤µ¤ò»ý¤Ä¥á¥â¥êÎΰè haystack ¤ÎÃæ¤Ç needlelen ¤ÎÂ礭¤µ¤ò»ý¤ÄÉôʬʸ»úÎó needle ¤¬ ºÇ½é¤Ë¸½¤ì¤ë°ÌÃÖ¤ò¸«¤Ä¤±¤ë¡£

ÊÖ¤êÃÍ

memmem() ´Ø¿ô¤Ï¡¢Éôʬʸ»úÎó¤Î³«»Ï¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤òÊÖ¤·¡¢¤â¤·Éôʬʸ»úÎó¤¬ ¸«¤Ä¤«¤é¤Ê¤¤¾ì¹ç¤Ï NULL ¤òÊÖ¤¹¡£

½àµò

¤³¤Î´Ø¿ô¤Ï GNU extension ¤Ç¤¢¤ë¡£

¥Ð¥°

Linux ¤Î¥é¥¤¥Ö¥é¥ê¤Ë´Ø¤·¤Æ¤¤¤¦¤È¡¢ libc 5.0.9 ¤È ¤½¤ì°ÊÁ°¤Î¤¹¤Ù¤Æ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¡¢¤³¤Î´Ø¿ô¤Ï²õ¤ì¤Æ¤¤¤ë¡£ ¤½¤ì¤é¤Î¥é¥¤¥Ö¥é¥ê¤Ç¤Ï `needle' ¤È `haystack' °ú¿ô¤¬ Æþ¤ìÂؤï¤Ã¤Æ¤ª¤ê¡¢ needle ¤¬ºÇ½é¤Ë½Ð¸½¤¹¤ëÉôʬ¤ÎºÇ¸å¤ò ¼¨¤¹¥Ý¥¤¥ó¥¿¤¬ÊÖ¤µ¤ì¤Æ¤¤¤¿¤Î¤Ç¤¢¤ë¡£ libc 5.0.9 ¤Ï¸½ºß¤â¹­¤¯»ÈÍѤµ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¤³¤Î´Ø¿ô¤ò»ÈÍѤ¹¤ë¤Î¤Ï ´í¸±¤Ç¤¢¤ë¡£
¿·µìξÊý¤Î libc ¥é¥¤¥Ö¥é¥ê¤¬¡¢ needle ¤¬¶õ¤Î¾ì¹ç (haystack ¤Î¤«¤ï¤ê¤Ë) haystack-1 ¤¬ ÊÖ¤µ¤ì¤ë¤È¤¤¤¦¥Ð¥°¤ò»ý¤Ã¤Æ¤¤¤ë¡£ ¤½¤·¤Æ¡¢glibc 2.0 ¤Ï¤è¤ê°­¤¯¤Ê¤Ã¤Æ¤ª¤ê¡¢ `haystack' ¤ÎºÇ¸å¤Î¥Ð¥¤¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£ ¤³¤ì¤Ï glibc 2.1 ¤Ç½¤Àµ¤µ¤ì¤¿¡£

´ØÏ¢¹àÌÜ

strstr(3), feature_test_macros(7)