strlen

홍민주·2021년 5월 30일
0

strlen

- 함수 설명

The strlen() function computes the length of the string s. The strnlen() function attempts to compute the length of s, but never scans beyond the first maxlen bytes of s.

- 매개변수

변수명설명
s크기를 측정할 메모리 시작위치

- 반환값

s의 길이

- 코드

size_t	strlen(const char *s)
{
	size_t len;

	len = 0;
	while (s[len])
		len++;
	return (len);
}
profile
백엔드 주니어 개발자 입니다~

0개의 댓글