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(字符串)的更多相关文章

  1. [LeetCode] Add Strings 字符串相加

    Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. ...

  2. [LeetCode] Multiply Strings 字符串相乘

    Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...

  3. 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 ...

  4. 【LeetCode每天一题】Multiply Strings(字符串乘法)

    Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and ...

  5. [LeetCode] 43. Multiply Strings ☆☆☆(字符串相乘)

    转载:43. Multiply Strings 题目描述 就是两个数相乘,输出结果,只不过数字很大很大,都是用 String 存储的.也就是传说中的大数相乘. 解法一 我们就模仿我们在纸上做乘法的过程 ...

  6. LeetCode OJ:Multiply Strings (字符串乘法)

    Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...

  7. [Leetcode] Multiply strings 字符串对应数字相乘

    Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...

  8. Multiply Strings(字符串乘法模拟,包含了加法模拟)

    Given two numbers represented as strings, return multiplication of the numbers as a string. Note: Th ...

  9. [LeetCode] 415. Add Strings 字符串相加

    Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. ...

  10. [LeetCode] 43. Multiply Strings 字符串相乘

    Given two non-negative integers num1 and num2represented as strings, return the product of num1 and  ...

随机推荐

  1. Cocos2dx 3.0 过渡篇(二十九)globalZOrder()与localZOrder()

    前天非常难得的加班到八点...为什么说难得呢?由于平时我差点儿就没加班过.六点下班后想走就走,想留就留.率直洒脱.不拘一格.尽显男儿本色.程序猿,就是这么自信! -----------这篇博客的标题本 ...

  2. careercup-高等难度 18.2

    18.2 编写一个方法,洗一副牌.要求做到完美洗牌,换言之,这幅牌52!种排列组合出现的概率相同.假设给定一个完美的随机发生器. 解法:假定有个数组,含有n个元素,类似如下: [1][2][3][4] ...

  3. 查看Linux系统架构类型的5条常用命令

    导读 很多时候我们都需要查看当前 Linux 系统是 32 位还是 64 位系统架构类型,本文中我将向大家推荐 5 条常用命令.无论你使用的是桌面版或是只装了文本界面的 Linux 环境,以下命令几乎 ...

  4. 关于android在Service中弹出Dialog对话框

    在创建好AlertDialog类型对象后,要 dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); 同时还 ...

  5. Scala初体验

    因为工作中要用到Scala了,本来前面自己还在学习Storm的,没有办法,先把Scala和Spark的这些内容学完在回去看Storm吧! 既然我们要学习Scala,那么我们不禁的要问了,什么是Scal ...

  6. Data Structure 之 KMC字符串匹配算法

    有关模式函数值next[i]确实有很多版本啊,在另外一些面向对象的算法描述书中也有失效函数 f(j)的说法,其实是一个意思,即next[j]=f(j-1)+1,不过还是next[j]这种表示法好理解啊 ...

  7. 认识C中的结构体

    C中结构体是另外一种表示数据形式的方式,结构体中可以表示C中的基本数据形式,如int,double....结构体可以让我们更好的表示数据.下面来看看结构体. 说到结构体首先要了解的是它的申明形式,要申 ...

  8. cigarettes

    描述 Tom has many cigarettes. We hypothesized that he has n cigarettes and smokes them one by one keep ...

  9. 1.4.2 solr字段类型--(1.4.2.6)使用外部文件和程序

    1.4.2 solr字段类型 (1.4.2.1) 字段类型定义和字段类型属性. (1.4.2.2) solr附带的字段类型 (1.4.2.3) 使用货币和汇率 (1.4.2.4) 使用Dates(日期 ...

  10. [Java] 遍历HashMap和HashMap转换成List的两种方式

    遍历HashMap和HashMap转换成List   /** * convert the map to the list(1) */ public static void main(String[] ...