【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.2.54 strlen
Contents
Description
Get the length of a string in bytes(not including the terminating null character).
Syntax
int strlen( LPCSTR lpString )
Parameters
- lpString
- [input] Pointer to a null-terminated string.
Return
the length of the string (not including zero termination).
Examples
EX1
void strlen_ex1() { string str1 = "Hello World!"; int len = strlen(str1); // len is 12 (the length of str1). out_int("The length is ", len); }
Remark
See Also
Header to Include
origin.h