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ストリングは、隠されたnul終端文字で終わる文字の並びです。その前に来る文字の数を返します——つまり 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. · 実行ボタンをクリックして出力を確認してください。