string函数分析string函数包含在string.c文件中,经常被C文件使用.1. strcpy函数原型: char* strcpy(char* str1,char* str2);函数功能: 把str2指向的字符串拷贝到str1中去函数返回: 返回str1,即指向str1的指针 /** * strcpy - Copy a %NUL terminated string * @dest: Where to copy the string to * @src: Where to copy the…
string常用成员函数 std::string::clear Clear string Erases the contents of the string, which becomes an empty string (with a length of 0 characters). Parameters none Return value none Example // string::clear #include <iostream> #include <string> int…