string类中截断函数erase
来源:互联网 发布:软件是怎么设计的 编辑:程序博客网 时间:2024/05/02 02:29
// erase_str.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <string>#include <algorithm>#include <iostream>int main(){ using namespace std; string strSample("Hello String! Wake up to a beautiful day!"); cout <<"The origin sample string is :" <<endl; cout <<strSample <<endl<<endl; string::iterator iCharS = find( strSample.begin(),strSample.end(),'S' ); cout<<"Erasing character 'S' from the sample string :"<<endl; if( iCharS != strSample.end() ) { strSample.erase(iCharS); } cout<<strSample<<endl<<endl; cout<<"Erasing a range between begin() and end() :"<<endl; strSample.erase(strSample.begin(),strSample.end()); if( strSample.length() == 0 ) { cout<<"The string is empty"<<endl; } getchar(); return 0;}
0 0
- string类中截断函数erase
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的使用
- C++中string erase函数的用法
- c++中string erase函数的使用
- C++中string erase函数的使用
- string 中 getline && erase
- C++中string erase函数的使用(转载)
- C++中string erase函数的使用(转载)
- C++中string erase函数的使用(转载)
- C++中string erase函数的使用(转载)
- 接口的应用
- 第一个java小游戏,贪吃蛇~真心求改进
- 教你查看预装Win8电脑内置系统激活密钥(Win8 OEM Key)
- 软件架构————设计启发
- workstation 搭建多个虚拟机
- string类中截断函数erase
- 开发中最常用的GitHub上 优秀的 Android 开源项目整理(精品)
- chromium for android v38硬件绘制渲染结构及流程分析(render进程)
- 我反对你,正是对你的支持
- i os 转屏API的改变
- 高佳程自我总结了一下,想了挺久,我是这样的程序员
- highgui.h备查
- Cocos2d-X中的CCAction
- Frogger UVA 534(最小瓶颈路+floyd算法)