求字符串长度-strlen
size_t strlen(const char *str)
char arr[] = "kobe";
int len = strlen(arr);
cout << len << endl;
***:strlen计算的是"**\0**"之前的数据长度
:参数指向的字符串必须以“\0”结束
:函数的返回值为size_t,是无符号的***
char arr1[] = { 'a','b','c' };
int l = strlen(arr1);
cout << l << endl;
if (strlen("abc") - strlen("abcdef") > 0)cout << ">" << endl;
else cout << "<" << endl;
字符串拷贝 strcpy
char *strcpy(char *destination,const chr*source)
char arr[20] = { 0 };
strcpy_s(arr,20,"hello");
cout << arr << endl;
字符串追加 strcat
char *strcat(char *destination,const char*source);
char arr[20] = "hello";
strcat_s(arr,20, "world");
cout << arr << endl;