std::string

std::string

typedef basic_string<char> string;
String类

String是描述字符串序列的对象

标准string类提供了与标准字节容器相似的接口的对象的支持,不过添加了一些新特性用于操作单一的字节字符。

The string class is an instantiation of the basic_string class template that uses char (i.e., bytes) as its character type, with its default char_traits and allocator types (see basic_string for more info on the template).


Note that this class handles bytes independently of the encoding used: If used to handle sequences of multi-byte or variable-length characters (such as UTF-8), all members of this class (such as length or size), as well as its iterators, will still operate in terms of bytes (not actual encoded characters).

请注意这个类独立于所有字节编码;如果使用多字符或可变长字符(例如UTF-8),这个类的所有成员(例如长度和大小)以及迭代器仍然以字节为单位(而不是字符编码).

成员类型


成员类型定义
value_typechar
traits_typechar_traits<char>
allocator_typeallocator<char>
referencechar&
const_referenceconst char&
pointerchar*
const_pointerconst char*
iteratorrandom access iterator to char (convertible to const_iterator)
const_iteratorrandom access iterator to const char

成员函数


迭代器:

功能:

Element access :

Modifiers :

String operations :

常量成员


重载函数





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值