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 ...
随机推荐
- You don't have permission to access / on this server
配置虚拟主机的时候,里面加上如下: <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOv ...
- js获取非行间样式/定义样式
<!--DOCTYPE html--> <html> <head> <meta charset="utf-8" /> <sty ...
- Linux内核分析笔记 与Linux内核开发理论
http://www.cnblogs.com/hanyan225/category/308793.html
- QT 操作数据库
整理一下 QT 操作数据库的一些要点,以备以后的查询学习(主要是操作 mysql ). 首先,要查询相关的驱动是否已经装好了,可以用以下的程序进行验证: #include <QtCore/QCo ...
- 入门之--linux配置php
[下载php源码]:从php的官方网站下载php的安装源码包. [解压安装包]:下载的安装包是经过压缩的gz格式,在linux可以使用自带的工具tar进行解压,在安装包所在目录执行命令:tar -zx ...
- shell 笔记
shell 笔记 通配符 没有 '.' [Aa] 表示 A 或者 a ? 表示任意字符 * 表示任意字符串 IFS data='name, sex, rollno, location' oldIFS= ...
- CSS 之 内层div填充margin,外层div的背景色不会覆盖该margin
外层元素(如div)中只有一个非空子元素,此时margin是被折叠了.两者之间取最大的margin值,表现在外层父元素上,而不是内层子元素. 注意: (1)只有垂直方向上才会出现此现象,水平方向不会出 ...
- 在Archlinux ARM - Raspberry Pi上安装Google coder
升级软件包 一个 pacman 命令就可以升级整个系统.花费的时间取决于系统有多老.这个命令会同步非本地(local)软件仓库并升级系统的软件包: # pacman -Syu 提示:确保make以及g ...
- Android 高级UI设计笔记16:ViewStub的应用
1. ViewStub 在开发应用程序的时候,经常会遇到这样的情况,会在运行时动态根据条件来决定显示哪个View或某个布局. 那么最通常的想法就是把可能用到的View都写在上面,先把它们的可见性都设为 ...
- 经典FormsAuthenticationTicket 分析
Asp.net中基于Forms验证的角色验证授权 Asp.net的身份验证有有三种,分别是"Windows | Forms | Passport",其中又以Forms验证用的最多, ...