Last Update 2012/07/05
文字列の長さを返します。
戻り値1 = strlen( 引数1 )
戻り値1 :
size_t
引数1の文字列長
引数1 :
char *
長さ算出の対象となる文字列
(例)
#include <stdio.h>
#include <string.h>
int main()
{
int n = strlen("test1");
printf("文字列長 : %d\n", n);
return 0;
}
実行結果
文字列長 : 5