String length · 문자열 길이
String length
A C-string is a row of characters that ends with a hidden null terminator. Return how many characters come before it — basically writing strlen yourself. Walk an index forward until you reach the terminator, counting as you go.
문자열 길이
C 문자열은 숨겨진 null 종결자(null terminator)로 끝나는 문자들의 줄입니다. 그 앞에 오는 문자의 개수를 반환합니다—실제로 strlen을 직접 작성하는 것입니다. 인덱스를 앞으로 이동하여 종결자에 도달할 때까지边走边计数.
Complete int str_len(const char *s) to return the length of the C-string s, without using strlen. Count characters until the null terminator. · int str_len(const char *s)를 완성하여 C-문자열 s의 길이를 strlen를 사용하지 않고 반환합니다. null 종결符까지 문자를 세십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.