随笔分类 -  字符串处理

摘要:erase函数的原型如下:(1)string& erase ( size_t pos = 0, size_t n = npos );(2)iterator erase ( iterator position );(3)iterator erase ( iterator first, iterator 阅读全文
posted @ 2016-03-01 10:20 初见不如不相见 阅读(14805) 评论(0) 推荐(0)
摘要:#include "stdafx.h"#include int _tmain(int argc, _TCHAR* argv[]){FILE * pFile;char buffer[] = { 'x' , 'y' , 'z' };pFile = fopen ( "myfile.bin" , "wb" ... 阅读全文
posted @ 2015-12-25 16:49 初见不如不相见 阅读(238) 评论(0) 推荐(0)
摘要:#include "stdafx.h"#include #include #include #include #include #include #include #include //#pragma comment(lib,"ws2_32.lib") using namespace std... 阅读全文
posted @ 2015-12-16 11:43 初见不如不相见 阅读(454) 评论(0) 推荐(0)
摘要:string 类提供字符串处理函数,利用这些函数,程序员可以在字符串内查找字符,提取连续字符序列(称为子串),以及在字符串中删除和添加。我们将介绍一些主要函数。1.函数find_first_of()和 find_last_of() 执行简单的模式匹配,如在字符串中查找单个字符c。函数find_fir... 阅读全文
posted @ 2015-12-16 11:11 初见不如不相见 阅读(3923) 评论(0) 推荐(0)