C++参考demo-提取子串
来源:互联网 发布:如何修改tomcat端口 编辑:程序博客网 时间:2024/06/01 10:41
// test0811.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <string>#include <iostream>using namespace std;int _tmain(int argc, _TCHAR* argv[]){ //找到h这个词,打印""之间的内容 string str = "abcdefgh+q\"jkeeeee\"lnm"; cout << "str==" << str<< endl; string temp; string aaa; int i = str.find("h"); cout << "i==" << i <<endl; aaa = str.substr(i+4,8); cout << "aaa=" << aaa <<endl; int i3 = aaa.find("\""); cout << "jige==" << i3 <<endl; if (i != str.npos) { cout << "yes" << i << endl; temp = str.substr(i+4, i3); cout << "hello=-=" << temp << endl; } return 0;}
阅读全文
0 0
- C++参考demo-提取子串
- 【C语言】 提取子字符串
- c++提取子串
- c++提取子串
- 提取子串-蓝桥杯
- 蓝桥杯 提取子串
- 提取子串
- 子串提取
- shell中提取子串
- shell中提取子串
- 字符串中提取子串
- 提取字符串最长子串
- 提取最长回文子串
- C#:从数组中提取子数组的扩展方法
- Javascript之提取一个子串
- 第三届蓝桥杯决赛 提取子串
- 正则表达式提取String子串
- 参考Demo,进行调试
- JavaWeb学习总结(二)——Tomcat服务器学习和使用(一)
- JavaScript
- Nginx 的软件负载均衡详解
- 进程、线程、协程以及使用的原因
- FPGA(一般只能处理定点数):浮点数的定点化
- C++参考demo-提取子串
- 安装anaconda
- java (类型转换,代码注释)
- Java线程之 InterruptedException 异常
- 数据结构 单向链表
- 回归程序猿科学的生活方式——总结一些开发经验
- Java Jedis操作Redis示例(四)——Redis和Mysql的结合方案演进
- Python Basic
- JavaWeb学习总结(二)——Tomcat服务器学习和使用(二)