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);
}