C++ Strings(字符串)
| Constructors | 构造函数,用于字符串初始化 |
| Operators | 操作符,用于字符串比较和赋值 |
| append() | 在字符串的末尾添加文本 |
| assign() | 为字符串赋新值 |
| at() | 按给定索引值返回字符 |
| begin() | 返回一个迭代器,指向第一个字符 |
| c_str() | 将字符串以C字符数组的形式返回 |
| capacity() | 返回重新分配空间前的字符容量 |
| compare() | 比较两个字符串 |
| copy() | 将内容复制为一个字符数组 |
| data() | 返回内容的字符数组形式 |
| empty() | 如果字符串为空,返回真 |
| end() | 返回一个迭代器,指向字符串的末尾。(最后一个字符的下一个位置) |
| erase() | 删除字符 |
| find() | 在字符串中查找字符 |
| find_first_of() | 查找第一个与value中的某值相等的字符 |
| find_first_not_of() | 查找第一个与value中的所有值都不相等的字符 |
| find_last_of() | 查找最后一个与value中的某值相等的字符 |
| find_last_not_of() | 查找最后一个与value中的所有值都不相等的字符 |
| get_allocator() | 返回配置器 |
| insert() | 插入字符 |
| length() | 返回字符串的长度 |
| max_size() | 返回字符的最大可能个数 |
| rbegin() | 返回一个逆向迭代器,指向最后一个字符 |
| rend() | 返回一个逆向迭代器,指向第一个元素的前一个位置 |
| replace() | 替换字符 |
| reserve() | 保留一定容量以容纳字符串(设置capacity值) |
| resize() | 重新设置字符串的大小 |
| rfind() | 查找最后一个与value相等的字符(逆向查找) |
| size() | 返回字符串中字符的数量 |
| substr() | 返回某个子字符串 |
| swap() | 交换两个字符串的内容 |
C++ Strings(字符串)的更多相关文章
- [LeetCode] Add Strings 字符串相加
Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. ...
- [LeetCode] Multiply Strings 字符串相乘
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...
- Codeforces Round #358 (Div. 2) D. Alyona and Strings 字符串dp
题目链接: 题目 D. Alyona and Strings time limit per test2 seconds memory limit per test256 megabytes input ...
- 【LeetCode每天一题】Multiply Strings(字符串乘法)
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and ...
- [LeetCode] 43. Multiply Strings ☆☆☆(字符串相乘)
转载:43. Multiply Strings 题目描述 就是两个数相乘,输出结果,只不过数字很大很大,都是用 String 存储的.也就是传说中的大数相乘. 解法一 我们就模仿我们在纸上做乘法的过程 ...
- LeetCode OJ:Multiply Strings (字符串乘法)
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...
- [Leetcode] Multiply strings 字符串对应数字相乘
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...
- Multiply Strings(字符串乘法模拟,包含了加法模拟)
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...
- [LeetCode] 415. Add Strings 字符串相加
Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. ...
- [LeetCode] 43. Multiply Strings 字符串相乘
Given two non-negative integers num1 and num2represented as strings, return the product of num1 and ...
随机推荐
- 激活office 2010
在激活office 2010版本时有的同学可能会用到“mini-KMS_Activator”这个工具,其实这个工具激活成功率并不算高,我就没激活成功.然后就是了另一款自动激活工具“Office 201 ...
- Sharepoint 列表ItemAdding事件判断文件类型、获取当前上传的文件
using System; using System.Security.Permissions; using Microsoft.SharePoint; using Microsoft.SharePo ...
- C语言中的各种修饰符
C允许同时使用多于一个的修饰符,这就使得可以创建一下各种类型: int board[8][8];//int数组的数组 int **ptr;//指向int的指针的指针 int *risk[10];//具 ...
- uboot 网络不通问题解决一例1
平台:Hi3531 PHY:RTL8211 现象:在uboot中执行ping命令的时候,总是超时. 过程: 使用uboot自带的phy操作命令mii读出的数据全是0xff.这里要介绍一下uboot中的 ...
- Xcode代码格式化教程,可自定义样式
来源:iOS_小松哥 链接:http://www.jianshu.com/p/a725e24d7835 为什么要格式化代码 当团队内有多人开发的时候,每个人写的代码格式都有自己的喜好,也可能会忙着写代 ...
- 转载:solr MoreLikeThis的原理分析
转载地址:http://blog.sina.com.cn/s/blog_5ddc071f0101muos.html 在solr中有两种方式实现MoreLikeThis:MoreLikeThisHand ...
- Swift - 使用NSNotificationCenter发送通知,接收通知
转载自:http://www.mamicode.com/info-detail-1069228.html 标签: 1,通知(NSNotification)介绍 这里所说的通知不是指发给用户看的通知消息 ...
- IDE改为AHCI后系统无法启动的解决办法
1.intel CPU 一.找到HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci,“Start”项值改为“0”. 二.重启,进入b ...
- 剑指Offer47 不用加减乘除做加法
/************************************************************************* > File Name: 47_AddTwo ...
- hdu 4412 利用单调性的动态规划
思路: 这题和1227的求法一样,只不过1227是小数据,暴力下,就能进行预处理. 这题的预处理区间期望cost[i][j]需要利用单调性. 即假使以pos位置为安排的点,那么这个区间在其左边的概率为 ...