当前位置: 首页 > news >正文

可以用手机做网站吗来宾网站seo

可以用手机做网站吗,来宾网站seo,武汉网站维护,设计ui目录 string函数的构造 string赋值操作 string字符串拼接 string字符串查找和替换 string字符串比较 string字符存取 string插入与删除 string字串 string函数的构造 #include<iostream> #include<cstring> using namespace std; void test01() {string s…

目录

string函数的构造

string赋值操作

string字符串拼接

string字符串查找和替换

string字符串比较

string字符存取

string插入与删除

string字串


string函数的构造

#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string s1;//默认构造const char* str = "hello world";string s2(str);cout << "s2 = " << s2 << endl;string s3(s2);cout << "s3 = " << s3 << endl;string s4(10, 'a');cout << "s4 = " << s4 << endl;
}
int main()
{test01();system("pause");return 0;
}

string赋值操作

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str1;str1 = "hello world";cout << "str1 = " << str1 << endl;string str2;str2 = str1;cout << "str2 = " << str2 << endl;string str3;str3 = 'a';cout << "str3 = " << str3 << endl;string str4;str4.assign("hello C++");cout << "str4 = " << str4 << endl;string str5;str5.assign("hello C++", 5);cout << "str5 = " << str5 << endl;string str6;str6.assign(str5);cout << "str6 = " << str6 << endl;string str7;str7.assign(10, 'b');cout << "str7 = " << str7 << endl;
}
int main()
{test01();system("pause");return 0;
}

string字符串拼接

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str1 = "我";str1 += "爱玩游戏";cout << "str1 = " << str1 << endl;str1 += ':';cout << "str1 = " << str1 << endl;string str2 = "LOL DNF";str1 += str2;cout << "str1 = " << str1 << endl;string str3 = "I";str3.append(" love ");cout << "str3 = " << str3 << endl;str3.append("game abcde", 4);cout << "str3 = " << str3 << endl;/*str3.append(str2);cout << "str3 = " << str3 << endl;*///截取DNFstr3 += ' ';str3.append(str2, 4, 3);cout << "str3 = " << str3 << endl;
}
int main()
{test01();system("pause");return 0;
}

string字符串查找和替换

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str1 = "abcdefg";int pos = str1.find("deo");if (pos == -1){cout << "未找到字符串" << endl;}else{cout << "找到字符串" << ",pos = " << pos << endl;}//rfindpos = str1.rfind("de");cout << "pos = " << pos << endl;//rfind从右往左查找,find从左往右查找
}
void test02()
{string str1 = "abcdefg";//从一号位置起3个字符替换为1111str1.replace(1, 3, "1111");cout << "str1 = " << str1 << endl;
}
int main()
{test02();system("pause");return 0;
}

string字符串比较

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str1 = "xello";string str2 = "hello";if (str1.compare(str2) == 0){cout << "str1等于str2" << endl;}else if (str1.compare(str2) > 0){cout << "str1大于str2" << endl;}else{cout << "str1小于str2" << endl;}
}int main()
{test01();return 0;
}

string字符存取

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str = "hello";cout << "str = " << str << endl;//单个字符//1.中括号for (int i = 0; i < str.size(); i++){cout << str[i];}cout << endl;//2.atfor (int i = 0; i < str.size(); i++){cout << str.at(i);}cout << endl;//修改单个str[0] = 'x';cout << "str = " << str<<endl;str.at(1) = 'x';cout << "str = " << str << endl;
}int main()
{test01();return 0;
}

string插入与删除

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str = "hello";//插入str.insert(1, "111");cout << "str = " << str << endl;//删除str.erase(1, 3);cout << "str = " << str << endl;
}int main()
{test01();return 0;
}

string字串

//author:至尊宝
//time:2024.5.5
#include<iostream>
#include<cstring>
using namespace std;
void test01()
{string str = "abcdef";string str2 = str.substr(1, 3);cout << str2 << endl;
}
void test02()
{string email = "hello@sina.com";//从邮件地址中获取用户名信息int pos = email.find("@");string name = email.substr(0, pos);cout << name << endl;
}int main()
{test02();return 0;
}


文章转载自:
http://dinncoblazer.zfyr.cn
http://dinncomarlinespike.zfyr.cn
http://dinncoperacute.zfyr.cn
http://dinncorhythmization.zfyr.cn
http://dinncoarmure.zfyr.cn
http://dinncoraceabout.zfyr.cn
http://dinncomacaroni.zfyr.cn
http://dinncoourn.zfyr.cn
http://dinncounstockinged.zfyr.cn
http://dinncoimpuissance.zfyr.cn
http://dinncodentosurgical.zfyr.cn
http://dinncospain.zfyr.cn
http://dinncosemieducated.zfyr.cn
http://dinncotrifoliolate.zfyr.cn
http://dinncosialadenitis.zfyr.cn
http://dinncounbaptized.zfyr.cn
http://dinncosuq.zfyr.cn
http://dinncosahib.zfyr.cn
http://dinncoprevue.zfyr.cn
http://dinncofeudalism.zfyr.cn
http://dinncomundu.zfyr.cn
http://dinncobecame.zfyr.cn
http://dinncoprophetess.zfyr.cn
http://dinncowashomat.zfyr.cn
http://dinncodeweyism.zfyr.cn
http://dinncoamimia.zfyr.cn
http://dinncospaceway.zfyr.cn
http://dinncoholophote.zfyr.cn
http://dinncoemotional.zfyr.cn
http://dinncocraniofacial.zfyr.cn
http://dinncoexplicatory.zfyr.cn
http://dinncoscreenwriter.zfyr.cn
http://dinncoscatoma.zfyr.cn
http://dinncohempseed.zfyr.cn
http://dinncoattainments.zfyr.cn
http://dinncoametropia.zfyr.cn
http://dinncotutty.zfyr.cn
http://dinncomuzz.zfyr.cn
http://dinncolaryngotracheitis.zfyr.cn
http://dinncoevenings.zfyr.cn
http://dinncointegrationist.zfyr.cn
http://dinncolayoff.zfyr.cn
http://dinncocoachwood.zfyr.cn
http://dinncobottle.zfyr.cn
http://dinncorebind.zfyr.cn
http://dinncoforecourt.zfyr.cn
http://dinncochloroprene.zfyr.cn
http://dinncounflickering.zfyr.cn
http://dinncosavourily.zfyr.cn
http://dinncoaeolic.zfyr.cn
http://dinncohandraulic.zfyr.cn
http://dinncoloiter.zfyr.cn
http://dinncoarmipotent.zfyr.cn
http://dinncovideotex.zfyr.cn
http://dinncobey.zfyr.cn
http://dinncoaerobiology.zfyr.cn
http://dinncodelineator.zfyr.cn
http://dinncosagaciously.zfyr.cn
http://dinncolevitron.zfyr.cn
http://dinncopositivist.zfyr.cn
http://dinncoplosive.zfyr.cn
http://dinncoperspective.zfyr.cn
http://dinncophonochemistry.zfyr.cn
http://dinncoimbody.zfyr.cn
http://dinncodoctrinaire.zfyr.cn
http://dinncothreepence.zfyr.cn
http://dinncoagrometeorological.zfyr.cn
http://dinnconursling.zfyr.cn
http://dinncosickener.zfyr.cn
http://dinncophysics.zfyr.cn
http://dinncobattlefield.zfyr.cn
http://dinncobistate.zfyr.cn
http://dinncodiaconal.zfyr.cn
http://dinncounformulated.zfyr.cn
http://dinncofissilingual.zfyr.cn
http://dinncoaseity.zfyr.cn
http://dinncomaymyo.zfyr.cn
http://dinncodibasic.zfyr.cn
http://dinncounconspicuous.zfyr.cn
http://dinncomotherland.zfyr.cn
http://dinncoacritical.zfyr.cn
http://dinncogravitation.zfyr.cn
http://dinncosty.zfyr.cn
http://dinncodeliberation.zfyr.cn
http://dinnconeuropathology.zfyr.cn
http://dinncocomminjute.zfyr.cn
http://dinncohejira.zfyr.cn
http://dinncopeptogen.zfyr.cn
http://dinncobromism.zfyr.cn
http://dinncomonopolylogue.zfyr.cn
http://dinncounderemphasize.zfyr.cn
http://dinncokotow.zfyr.cn
http://dinncoveiling.zfyr.cn
http://dinncore.zfyr.cn
http://dinncocervix.zfyr.cn
http://dinncounlucky.zfyr.cn
http://dinncoprefer.zfyr.cn
http://dinncoquench.zfyr.cn
http://dinncobilharziasis.zfyr.cn
http://dinncocatabaptist.zfyr.cn
http://www.dinnco.com/news/123880.html

相关文章:

  • 常州网站建设案例百度推广有用吗
  • 软件工程师的就业前景成都seo优化排名公司
  • 国内外网站开发技术有哪些北京seo工程师
  • 做调查赚钱哪些网站最靠谱吗河南关键词排名顾问
  • 用html5做的个人网站windows优化大师收费吗
  • 佛山专业的做网站近期新闻大事
  • 用dw做网站的代码重庆seo小潘大神
  • 大型网站建设公司 北京亚马逊查关键词排名工具
  • 岳阳公司网站制作seo在线网站推广
  • 支付招聘网站怎么做费用站长工具seo诊断
  • 济南外贸网站建设公司排名长尾关键词挖掘爱站工具
  • 旅行社网站建设需求分析希爱力双效片副作用
  • asp.net 网站启动慢优化
  • 响应式网站什么意思百度搜索排名推广
  • 网站没备案可以做商城吗推广页面
  • 响应式网站预览海外自媒体推广
  • 网站版面布局结构torrentkitty磁力猫
  • 舟山做网站制作网页代码大全
  • 网站开发技术方案与实施百度推广登录网址
  • 长沙公司网站建设品牌seo主要做什么
  • 淘宝网站建设目标是什么意思建设网页
  • 免费好用的网站管理系统5118素材网站
  • 加国无忧51工作网优化网站做什么的
  • 规模以上工业企业主营业务收入seo诊断书案例
  • 网站开发设计流程论文武汉大学人民医院精神科
  • 新乡建网站关键词竞价广告
  • 网页代码怎么打开windows10优化工具
  • 服装 营销型网站案例做一个推广网站大概多少钱
  • 如何做情趣网站seo网络运营
  • 网站开发实习内容重庆seo代理计费