Strings library

来自cppreference.com
< cpp


 
 
字符串库
null结尾的字符串
原文:
Null-terminated strings
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
字节的字符串
多字节字符串
宽字符串
原文:
Classes
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
basic_string
char_traits
 
C + +字符串库包括支持两个一般类型的字符串
原文:
The C++ strings library includes support for two general types of strings:
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
  • std::basic_string - 设计一个模板类来处理字符串的任何字符类型.
    原文:
    std::basic_string - a templated class designed to manipulate strings of any character type.
    这段文字是通过 Google Translate 自动翻译生成的。
    您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
  • NULL结尾的字符串 - 由一个特殊的“空”字符结尾的字符数组.
    原文:
    Null-terminated strings - arrays of characters terminated by a special null character.
    这段文字是通过 Google Translate 自动翻译生成的。
    您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

目录

[编辑] std::basic_string

模板类std::basic_string概括了如何操纵和存储的字符序列。字符串创建,操纵和破坏,都是通过一个方便的设置的类的方法和相关的功能.
原文:
The templated class std::basic_string generalizes how sequences of characters are manipulated and stored. String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
一些专业std::basic_string提供常用的类型
原文:
Several specializations of std::basic_string are provided for commonly-used types:
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
在头文件 <string> 中定义
类型
原文:
Type
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
Definition
std::string std::basic_string<char>
std::wstring std::basic_string<wchar_t>
std::u16string std::basic_string<char16_t>
std::u32string std::basic_string<char32_t>

[编辑] null结尾的字符串

null结尾的字符串数组,通过一个特殊的“空”字符的字符被终止。 C + +提供的功能来创建,检查和修改null结尾的字符串.
原文:
Null-terminated strings are arrays of characters that are terminated by a special null character. C++ provides functions to create, inspect, and modify null-terminated strings.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
有三种类型的空终止字符串
原文:
There are three types of null-terminated strings:
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 额外的支持

[编辑] char_traits

的字符串库还提供了类的模板char_traits,定义类型和函数std::basic_string。以下专业的定义
原文:
The string library also provides class template char_traits that defines types and functions for std::basic_string. The following specializations are defined:
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
在头文件 <string> 中定义
template<> class char_traits<std::string>;

template<> class char_traits<std::wstring>;
template<> class char_traits<std::u16string>;

template<> class char_traits<std::u32string>;


(C++11 起)
(C++11 起)