📄 str.cpp
字号:
#include <cpp>
void info()
{
//information here......
}
void test()
{
char x[30] = "People's Repubic of ";
char y[] = "China";
cout << "\nx=" << x;
cout << "\ny=" << y;
cout << "\nlenth of x is: " << sizeof(x);
cout << "\nlenth of y is: " << sizeof(y);
cout << "\nstrcat(x, y)=" << strcat(x, y);//connect
cout << "\nstrcpy(x, \"Chinnnnnnn\")=" << strcpy(x, "Chinnnnnn");//copy
cout << "\tx=" << x;
myline();
cout << "\nstrcmp(x, y)=" << strcmp(x, y);//compare
cout << "\nstrcmp(x, x)=" << strcmp(x, x);//compare
cout << "\nstrcmp(y, x)=" << strcmp(y, x);//compare
cout << "\nstrlen(x)=" << strlen(x);//string length
cout << "\nstrlen(y)=" << strlen(y);//string length
//code here......
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -