Scroll to navigation

strstr(3) Library Functions Manual strstr(3)

이름

strstr, strcasestr - substring을 찾는다

라이브러리

표준 C 라이브러리 (libc, -lc)

요약

#include <string.h>
char *strstr(const char *haystack, const char *needle);
#define _GNU_SOURCE         /* See feature_test_macros(7) */
#include <string.h>
char *strcasestr(const char *haystack, const char *needle);

설명

The strstr() function finds the first occurrence of the substring needle in the string haystack. The terminating null bytes ('\0') are not compared.

The strcasestr() function is like strstr(), but ignores the case of both arguments.

반환값

These functions return a pointer to the beginning of the located substring, or NULL if the substring is not found.

If needle is the empty string, the return value is always haystack itself.

속성

이 섹션에서 사용되는 용어에 대한 설명은 attributes(7)을 참조하십시오.

상호 작용 속성 번호
strstr() Thread safety MT-Safe
strcasestr() Thread safety MT-Safe locale

표준

C11, POSIX.1-2008.
GNU.

이력

POSIX.1-2001, C89.
GNU.

추가 참조

memchr(3), memmem(3), strcasecmp(3), strchr(3), string(3), strpbrk(3), strsep(3), strspn(3), strtok(3), wcsstr(3)

번역

이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다: 정강훈 <skyeyes@soback.kornet.net>

이 번역은 무료 문서입니다. 저작권 조건에 대해서는 GNU General Public License 버전 3 이상을 읽으십시오. 책임이 없습니다.

이 매뉴얼 페이지의 번역에서 오류를 발견하면 translation-team-ko@googlegroups.com 로 이메일을 보내주십시오.

2023년 7월 20일 Linux man-pages 6.05.01