YSTest: ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc > 模板类 参考

YSTest PreAlpha_b900_20201012 The YSLib Test Project

Public 类型 | Public 成员函数 | 静态 Public 属性 | Private 类型 | 友元 | 所有成员列表
ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc > 模板类 参考
YBase Replacement features

`#include <string.hpp>`

类 ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc > 继承关系图:
[图例]
ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc > 的协作图:
[图例]

## Public 类型

using | size_type = typename base::size_type
using | iterator = typename base::iterator
using | const_iterator = typename base::const_iterator

## Public 成员函数

| basic_string ()
| basic_string (const _tAlloc &a)
| basic_string (const base &str, size_type pos, const _tAlloc &a=_tAlloc())
| basic_string (const base &str, size_type pos, size_type n, const _tAlloc &a=_tAlloc())
template<class _type , typename = enable_if_sv_t<_type>>
| basic_string (const _type &t, size_type pos, size_type n, const _tAlloc &a=_tAlloc())
| basic_string (sv_type sv, const _tAlloc &a=_tAlloc())
| basic_string (const _tChar *s, size_type n, const _tAlloc &a=_tAlloc())
| basic_string (const _tChar *s, const _tAlloc &a=_tAlloc())
| basic_string (size_type n, _tChar c, const _tAlloc &a=_tAlloc())
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>
| basic_string (_tIn begin, _tIn end, const _tAlloc &a=_tAlloc())
| basic_string (std::initializer_list< _tChar > il, const _tAlloc &a=_tAlloc())
| basic_string (const base &str, const _tAlloc &a)
| basic_string (base &&str, const _tAlloc &a)
| basic_string (const base &str)
| basic_string (base &&str)
| basic_string (const basic_string &)=default
| basic_string (basic_string &&)=default
basic_string & | operator= (sv_type sv)
basic_string & | operator= (const _tChar *s)
basic_string & | operator= (_tChar c)
basic_string & | operator= (std::initializer_list< _tChar > il)
basic_string & | operator= (const base &str)
basic_string & | operator= (base &&str)
basic_string & | operator= (const basic_string &)=default
basic_string & | operator= (basic_string &&)=default
basic_string & | operator+= (const base &str)
basic_string & | operator+= (const basic_string &str)
basic_string & | operator+= (sv_type sv)
basic_string & | operator+= (const _tChar *s)
basic_string & | operator+= (_tChar c)
basic_string & | operator+= (std::initializer_list< _tChar > il)
| operator sv_type () const
basic_string & | append (const base &str)
basic_string & | append (const base &str, size_type pos, size_type n=npos)
basic_string & | append (sv_type sv)
template<typename _type >
enable_if_sv_t< _type, basic_string & > | append (const _type &t, size_type pos, size_type n=npos)
basic_string & | append (const _tChar *s)
basic_string & | append (const _tChar *s, size_type n)
basic_string & | append (size_type n, _tChar c)
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>
basic_string & | append (_tIn first, _tIn last)
basic_string & | append (std::initializer_list< _tChar > il)
basic_string & | assign (const base &str)
basic_string & | assign (base &&str)
basic_string & | assign (const base &str, size_type pos, size_type n=npos)
basic_string & | assign (sv_type sv)
template<typename _type >
enable_if_sv_t< _type, basic_string & > | assign (const _type &t, size_type pos, size_type n=npos)
basic_string & | assign (const _tChar *s)
basic_string & | assign (const _tChar *s, size_type n)
basic_string & | assign (size_type n, _tChar c)
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>
basic_string & | assign (_tIn first, _tIn last)
basic_string & | assign (std::initializer_list< _tChar > il)
basic_string & | insert (size_type pos, const base &str)
basic_string & | insert (size_type pos1, const base &str, size_type pos2, size_type n=npos)
basic_string & | insert (size_type pos, sv_type sv)
template<typename _type >
enable_if_sv_t< _type, basic_string & > | insert (size_type pos1, const _type &t, size_type pos2, size_type n=npos)
basic_string & | insert (size_type pos, const _tChar *s)
basic_string & | insert (size_type pos, const _tChar *s, size_type n)
basic_string & | insert (size_type pos, size_type n, _tChar c)
iterator | insert (const_iterator p, _tChar c)
iterator | insert (const_iterator p, size_type n, _tChar c)
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>
iterator | insert (const_iterator p, _tIn first, _tIn last)
iterator | insert (const_iterator p, std::initializer_list< _tChar > il)
basic_string & | replace (size_type pos1, size_type n1, const base &str)
basic_string & | replace (size_type pos1, size_type n1, const base &str, size_type pos2, size_type n2=npos)
basic_string & | replace (size_type pos1, size_type n1, sv_type sv)
template<typename _type >
enable_if_sv_t< _type, basic_string & > | replace (size_type pos1, size_type n1, const _type &t, size_type pos2, size_type n2=npos)
basic_string & | replace (size_type pos, size_type n, const _tChar *s)
basic_string & | replace (size_type pos1, size_type n1, const _tChar *s, size_type n2=npos)
basic_string & | replace (size_type pos1, size_type n1, size_type n2, _tChar c)
basic_string & | replace (const_iterator i1, const_iterator i2, const base &str)
basic_string & | replace (const_iterator i1, const_iterator i2, sv_type sv)
basic_string & | replace (const_iterator i1, const_iterator i2, const _tChar *s, size_type n)
basic_string & | replace (const_iterator i1, const_iterator i2, size_type n, _tChar c)
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>
basic_string & | replace (const_iterator i1, const_iterator i2, _tIn j1, _tIn j2)
basic_string & | replace (const_iterator i1, const_iterator i2, std::initializer_list< _tChar > il)
basic_string | substr (size_type pos=0, size_type n=npos) const
void | swap (basic_string &s)
size_type | find (sv_type sv, size_type pos=0) const
size_type | rfind (sv_type sv, size_type pos=npos) const
size_type | find_first_of (sv_type sv, size_type pos=0) const
size_type | find_last_of (sv_type sv, size_type pos=npos) const
size_type | find_first_not_of (sv_type sv, size_type pos=0) const
size_type | find_last_not_of (sv_type sv, size_type pos=npos) const
int | compare (sv_type sv) const
int | compare (size_type pos1, size_type n1, sv_type sv) const
template<typename _type >
enable_if_sv_t< _type, int > | compare (size_type pos1, size_type n1, const _type &t, size_type pos2, size_type n2=npos) const

## 静态 Public 属性

static const auto | npos {static_cast<size_type>(-1)}

## Private 类型

using | base = std::basic_string< _tChar, _tTraits, _tAlloc >
using | ator_traits = allocator_traits< _tAlloc >
template<typename _tTrait >
using | equal_alloc_or = or_< _tTrait, typename ator_traits::is_always_equal >
using | equal_alloc_or_pocma = equal_alloc_or< typename ator_traits::propagate_on_container_move_assignment >
using | sv_type = basic_string_view< _tChar, _tTraits >
template<class _type , class _tRes = void>
using | enable_if_sv_t = enable_if_t< and_< is_convertible< const _type &, sv_type >, not_< is_convertible< const _type *, const base * > >, not_< is_convertible< const _type &, const _tChar * > >>::value, _tRes >

## 友元

void | swap (basic_string &lhs, basic_string &rhs)
basic_string | operator+ (const basic_string &lhs, const basic_string &rhs)
basic_string | operator+ (basic_string &&lhs, const basic_string &rhs)
basic_string | operator+ (const basic_string &lhs, basic_string &&rhs)
basic_string | operator+ (basic_string &&lhs, basic_string &&rhs)
basic_string | operator+ (const _tChar *lhs, const basic_string &rhs)
basic_string | operator+ (const _tChar *lhs, basic_string &&rhs)
basic_string | operator+ (_tChar lhs, const basic_string &rhs)
basic_string | operator+ (_tChar lhs, basic_string &&rhs)
basic_string | operator+ (const basic_string &lhs, const _tChar *rhs)
basic_string | operator+ (basic_string &&lhs, const _tChar *rhs)
basic_string | operator+ (const basic_string &lhs, _tChar rhs)
basic_string | operator+ (basic_string &&lhs, _tChar rhs)

## 详细描述

### template<typename _tChar, class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
class ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >

注解
  所有 find 相关的函数的 noexcept 异常规范同 std::basic_string 。
  支持和 std::basic_string 转换以避免修改多数用户代码。
  WG21 P1148R0 实质没有修改输入迭代器要求的相关接口，因此在此直接忽略约束。

待办事项:
  支持 ISO C++20 API ，解决 LWG 3076 。

在文件 string.hpp 第 76 行定义.

## 成员类型定义说明

## ◆ ator_traits

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::ator_traits = allocator_traits<_tAlloc>

private

自从
  build 865

在文件 string.hpp 第 81 行定义.

## ◆ base

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::base = std::basic_string<_tChar, _tTraits, _tAlloc>

private

在文件 string.hpp 第 79 行定义.

## ◆ const_iterator

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::const_iterator = typename base::const_iterator

在文件 string.hpp 第 97 行定义.

## ◆ enable_if_sv_t

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<class _type , class _tRes = void>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::enable_if_sv_t = enable_if_t<and_<is_convertible<const _type&, sv_type>, not_<is_convertible<const _type*, const base*> >, not_<is_convertible<const _type&, const _tChar*> >>::value, _tRes>

private

在文件 string.hpp 第 90 行定义.

## ◆ equal_alloc_or

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _tTrait >

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::equal_alloc_or = or_<_tTrait, typename ator_traits::is_always_equal>

private

在文件 string.hpp 第 83 行定义.

## ◆ equal_alloc_or_pocma

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::equal_alloc_or_pocma = equal_alloc_or<typename ator_traits::propagate_on_container_move_assignment>

private

在文件 string.hpp 第 84 行定义.

## ◆ iterator

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::iterator = typename base::iterator

在文件 string.hpp 第 96 行定义.

## ◆ size_type

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::size_type = typename base::size_type

在文件 string.hpp 第 95 行定义.

## ◆ sv_type

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

using ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::sv_type = basic_string_view<_tChar, _tTraits>

private

在文件 string.hpp 第 86 行定义.

## 构造及析构函数说明

## ◆ basic_string() [1/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( |  | ) |

inline

参见
  LWG 2193 。
  LWG 2455 。

在文件 string.hpp 第 110 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::operator=() , 以及 ystdex::cpp2017::basic_string< char >::substr().

这是这个函数的调用关系图:

## ◆ basic_string() [2/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const _tAlloc & | a | ) |

inlineexplicit

参见
  LWG 2193 。

在文件 string.hpp 第 115 行定义.

## ◆ basic_string() [3/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const base & | str,
|  | size_type | pos,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

参见
  LWG 2583 。

在文件 string.hpp 第 119 行定义.

## ◆ basic_string() [4/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const base & | str,
|  | size_type | pos,
|  | size_type | n,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

在文件 string.hpp 第 122 行定义.

## ◆ basic_string() [5/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<class _type , typename = enable_if_sv_t<_type>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const _type & | t,
|  | size_type | pos,
|  | size_type | n,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

参见
  LWG 2742 。

在文件 string.hpp 第 128 行定义.

## ◆ basic_string() [6/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | sv_type | sv,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inlineexplicit

参见
  WG21 P0254R2 。

在文件 string.hpp 第 134 行定义.

## ◆ basic_string() [7/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const _tChar * | s,
|  | size_type | n,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

自从
  build 838

在文件 string.hpp 第 145 行定义.

## ◆ basic_string() [8/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const _tChar * | s,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

在文件 string.hpp 第 149 行定义.

## ◆ basic_string() [9/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | size_type | n,
|  | _tChar | c,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

在文件 string.hpp 第 152 行定义.

## ◆ basic_string() [10/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | _tIn | begin,
|  | _tIn | end,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

参见
  ISO C++17 [sequences.reqmts]/13 。
  LWG 438 。
  LWG 1234 。

在文件 string.hpp 第 161 行定义.

## ◆ basic_string() [11/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | std::initializer_list< _tChar > | il,
|  | const _tAlloc & | a = `_tAlloc()`
| ) |  |

inline

在文件 string.hpp 第 164 行定义.

## ◆ basic_string() [12/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const base & | str,
|  | const _tAlloc & | a
| ) |  |

inline

在文件 string.hpp 第 167 行定义.

## ◆ basic_string() [13/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | base && | str,
|  | const _tAlloc & | a
| ) |  |

inline

在文件 string.hpp 第 170 行定义.

## ◆ basic_string() [14/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const base & | str | ) |

inline

在文件 string.hpp 第 175 行定义.

## ◆ basic_string() [15/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | base && | str | ) |

inline

在文件 string.hpp 第 178 行定义.

## ◆ basic_string() [16/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | const basic_string< _tChar, _tTraits, _tAlloc > & |  | ) |

default

## ◆ basic_string() [17/17]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::basic_string | ( | basic_string< _tChar, _tTraits, _tAlloc > && |  | ) |

default

## 成员函数说明

## ◆ append() [1/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | _tIn | first,
|  | _tIn | last
| ) |  |

inline

参见
  ISO C++17 [sequences.reqmts]/13 。
  LWG 438 。
  LWG 1234 。
  LWG 2788 。

在文件 string.hpp 第 327 行定义.

## ◆ append() [2/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | const _tChar * | s | ) |

inline

在文件 string.hpp 第 302 行定义.

## ◆ append() [3/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | const _tChar * | s,
|  | size_type | n
| ) |  |

inline

在文件 string.hpp 第 308 行定义.

## ◆ append() [4/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _type >

enable_if_sv_t<_type, basic_string&> ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | const _type & | t,
|  | size_type | pos,
|  | size_type | n = `npos`
| ) |  |

inline

参见
  LWG 2758 。

在文件 string.hpp 第 288 行定义.

## ◆ append() [5/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | const base & | str | ) |

inline

在文件 string.hpp 第 266 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::append() , 以及 ystdex::cpp2017::basic_string< char >::operator+=().

这是这个函数的调用关系图:

## ◆ append() [6/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | const base & | str,
|  | size_type | pos,
|  | size_type | n = `npos`
| ) |  |

inline

参见
  LWG 2268 。

在文件 string.hpp 第 273 行定义.

## ◆ append() [7/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | size_type | n,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 314 行定义.

## ◆ append() [8/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | std::initializer_list< _tChar > | il | ) |

inline

在文件 string.hpp 第 333 行定义.

## ◆ append() [9/9]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::append | ( | sv_type | sv | ) |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 281 行定义.

## ◆ assign() [1/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | _tIn | first,
|  | _tIn | last
| ) |  |

inline

参见
  ISO C++17 [sequences.reqmts]/13 。
  LWG 438 。
  LWG 1234 。
  LWG 2788 。

在文件 string.hpp 第 406 行定义.

## ◆ assign() [2/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | base && | str | ) |

inline

在文件 string.hpp 第 346 行定义.

## ◆ assign() [3/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | const _tChar * | s | ) |

inline

在文件 string.hpp 第 381 行定义.

## ◆ assign() [4/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | const _tChar * | s,
|  | size_type | n
| ) |  |

inline

在文件 string.hpp 第 387 行定义.

## ◆ assign() [5/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _type >

enable_if_sv_t<_type, basic_string&> ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | const _type & | t,
|  | size_type | pos,
|  | size_type | n = `npos`
| ) |  |

inline

参见
  LWG 2758 。

在文件 string.hpp 第 367 行定义.

## ◆ assign() [6/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | const base & | str | ) |

inline

参见
  LWG 2579 。

在文件 string.hpp 第 341 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::assign() , 以及 ystdex::cpp2017::basic_string< char >::operator=().

这是这个函数的调用关系图:

## ◆ assign() [7/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | const base & | str,
|  | size_type | pos,
|  | size_type | n = `npos`
| ) |  |

inline

参见
  LWG 2268 。

在文件 string.hpp 第 352 行定义.

## ◆ assign() [8/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | size_type | n,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 393 行定义.

## ◆ assign() [9/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | std::initializer_list< _tChar > | il | ) |

inline

在文件 string.hpp 第 412 行定义.

## ◆ assign() [10/10]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::assign | ( | sv_type | sv | ) |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 360 行定义.

## ◆ compare() [1/3]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _type >

enable_if_sv_t<_type, int> ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::compare | ( | size_type | pos1,
|  | size_type | n1,
|  | const _type & | t,
|  | size_type | pos2,
|  | size_type | n2 = `npos`
| ) |  | const

inline

参见
  LWG 2758 。

在文件 string.hpp 第 695 行定义.

## ◆ compare() [2/3]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

int ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::compare | ( | size_type | pos1,
|  | size_type | n1,
|  | sv_type | sv
| ) |  | const

inline

参见
  LWG 2771 。

在文件 string.hpp 第 688 行定义.

## ◆ compare() [3/3]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

int ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::compare | ( | sv_type | sv | ) | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 681 行定义.

## ◆ find()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

size_type ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::find | ( | sv_type | sv,
|  | size_type | pos = `0`
| ) |  | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 632 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::find().

这是这个函数的调用关系图:

## ◆ find_first_not_of()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

size_type ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::find_first_not_of | ( | sv_type | sv,
|  | size_type | pos = `0`
| ) |  | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 664 行定义.

被这些函数引用 platform::FAT::LFN::ConvertToAlias() , 以及 ystdex::cpp2017::basic_string< char >::find_first_not_of().

这是这个函数的调用关系图:

## ◆ find_first_of()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

size_type ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::find_first_of | ( | sv_type | sv,
|  | size_type | pos = `0`
| ) |  | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 648 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::find_first_of().

这是这个函数的调用关系图:

## ◆ find_last_not_of()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

size_type ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::find_last_not_of | ( | sv_type | sv,
|  | size_type | pos = `npos`
| ) |  | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 672 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::find_last_not_of().

这是这个函数的调用关系图:

## ◆ find_last_of()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

size_type ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::find_last_of | ( | sv_type | sv,
|  | size_type | pos = `npos`
| ) |  | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 656 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::find_last_of().

这是这个函数的调用关系图:

## ◆ insert() [1/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

iterator ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | const_iterator | p,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 473 行定义.

## ◆ insert() [2/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>

iterator ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | const_iterator | p,
|  | _tIn | first,
|  | _tIn | last
| ) |  |

inline

参见
  ISO C++17 [sequences.reqmts]/13 。
  LWG 438 。
  LWG 1234 。
  LWG 2788 。

在文件 string.hpp 第 490 行定义.

## ◆ insert() [3/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

iterator ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | const_iterator | p,
|  | size_type | n,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 478 行定义.

## ◆ insert() [4/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

iterator ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | const_iterator | p,
|  | std::initializer_list< _tChar > | il
| ) |  |

inline

在文件 string.hpp 第 496 行定义.

## ◆ insert() [5/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos,
|  | const _tChar * | s
| ) |  |

inline

在文件 string.hpp 第 455 行定义.

## ◆ insert() [6/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos,
|  | const _tChar * | s,
|  | size_type | n
| ) |  |

inline

在文件 string.hpp 第 461 行定义.

## ◆ insert() [7/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos,
|  | const base & | str
| ) |  |

inline

在文件 string.hpp 第 419 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::insert().

这是这个函数的调用关系图:

## ◆ insert() [8/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos,
|  | size_type | n,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 467 行定义.

## ◆ insert() [9/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos,
|  | sv_type | sv
| ) |  |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 434 行定义.

## ◆ insert() [10/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _type >

enable_if_sv_t<_type, basic_string&> ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos1,
|  | const _type & | t,
|  | size_type | pos2,
|  | size_type | n = `npos`
| ) |  |

inline

参见
  LWG 2758 。

在文件 string.hpp 第 441 行定义.

## ◆ insert() [11/11]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::insert | ( | size_type | pos1,
|  | const base & | str,
|  | size_type | pos2,
|  | size_type | n = `npos`
| ) |  |

inline

参见
  LWG 2268 。

在文件 string.hpp 第 426 行定义.

## ◆ operator sv_type()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator sv_type | ( |  | ) | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 260 行定义.

## ◆ operator+=() [1/6]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator+= | ( | _tChar | c | ) |

inline

在文件 string.hpp 第 246 行定义.

## ◆ operator+=() [2/6]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator+= | ( | const _tChar * | s | ) |

inline

在文件 string.hpp 第 240 行定义.

## ◆ operator+=() [3/6]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator+= | ( | const base & | str | ) |

inline

在文件 string.hpp 第 223 行定义.

## ◆ operator+=() [4/6]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator+= | ( | const basic_string< _tChar, _tTraits, _tAlloc > & | str | ) |

inline

在文件 string.hpp 第 229 行定义.

## ◆ operator+=() [5/6]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator+= | ( | std::initializer_list< _tChar > | il | ) |

inline

在文件 string.hpp 第 252 行定义.

## ◆ operator+=() [6/6]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator+= | ( | sv_type | sv | ) |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 235 行定义.

## ◆ operator=() [1/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | _tChar | c | ) |

inline

在文件 string.hpp 第 196 行定义.

## ◆ operator=() [2/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | base && | str | ) |

inline

在文件 string.hpp 第 212 行定义.

## ◆ operator=() [3/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | basic_string< _tChar, _tTraits, _tAlloc > && |  | ) |

default

## ◆ operator=() [4/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | const _tChar * | s | ) |

inline

在文件 string.hpp 第 191 行定义.

## ◆ operator=() [5/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | const base & | str | ) |

inline

在文件 string.hpp 第 206 行定义.

## ◆ operator=() [6/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | const basic_string< _tChar, _tTraits, _tAlloc > & |  | ) |

default

## ◆ operator=() [7/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | std::initializer_list< _tChar > | il | ) |

inline

在文件 string.hpp 第 201 行定义.

## ◆ operator=() [8/8]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::operator= | ( | sv_type | sv | ) |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 186 行定义.

## ◆ replace() [1/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _tIn , typename = enable_for_input_iterator_t<_tIn>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | const_iterator | i1,
|  | const_iterator | i2,
|  | _tIn | j1,
|  | _tIn | j2
| ) |  |

inline

参见
  ISO C++17 [sequences.reqmts]/13 。
  LWG 438 。
  LWG 1234 。
  LWG 2788 。

在文件 string.hpp 第 589 行定义.

## ◆ replace() [2/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | const_iterator | i1,
|  | const_iterator | i2,
|  | const _tChar * | s,
|  | size_type | n
| ) |  |

inline

在文件 string.hpp 第 570 行定义.

## ◆ replace() [3/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | const_iterator | i1,
|  | const_iterator | i2,
|  | const base & | str
| ) |  |

inline

在文件 string.hpp 第 558 行定义.

## ◆ replace() [4/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | const_iterator | i1,
|  | const_iterator | i2,
|  | size_type | n,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 576 行定义.

## ◆ replace() [5/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | const_iterator | i1,
|  | const_iterator | i2,
|  | std::initializer_list< _tChar > | il
| ) |  |

inline

在文件 string.hpp 第 596 行定义.

## ◆ replace() [6/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | const_iterator | i1,
|  | const_iterator | i2,
|  | sv_type | sv
| ) |  |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 565 行定义.

## ◆ replace() [7/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos,
|  | size_type | n,
|  | const _tChar * | s
| ) |  |

inline

在文件 string.hpp 第 540 行定义.

## ◆ replace() [8/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos1,
|  | size_type | n1,
|  | const _tChar * | s,
|  | size_type | n2 = `npos`
| ) |  |

inline

在文件 string.hpp 第 546 行定义.

## ◆ replace() [9/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>
template<typename _type >

enable_if_sv_t<_type, basic_string&> ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos1,
|  | size_type | n1,
|  | const _type & | t,
|  | size_type | pos2,
|  | size_type | n2 = `npos`
| ) |  |

inline

参见
  LWG 2758 。

在文件 string.hpp 第 525 行定义.

## ◆ replace() [10/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos1,
|  | size_type | n1,
|  | const base & | str
| ) |  |

inline

在文件 string.hpp 第 502 行定义.

被这些函数引用 ystdex::cpp2017::basic_string< char >::replace().

这是这个函数的调用关系图:

## ◆ replace() [11/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos1,
|  | size_type | n1,
|  | const base & | str,
|  | size_type | pos2,
|  | size_type | n2 = `npos`
| ) |  |

inline

参见
  LWG 2268 。

在文件 string.hpp 第 509 行定义.

## ◆ replace() [12/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos1,
|  | size_type | n1,
|  | size_type | n2,
|  | _tChar | c
| ) |  |

inline

在文件 string.hpp 第 552 行定义.

## ◆ replace() [13/13]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string& ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::replace | ( | size_type | pos1,
|  | size_type | n1,
|  | sv_type | sv
| ) |  |

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 518 行定义.

## ◆ rfind()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

size_type ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::rfind | ( | sv_type | sv,
|  | size_type | pos = `npos`
| ) |  | const

inline

参见
  WG21 P0254R2 。

在文件 string.hpp 第 640 行定义.

被这些函数引用 platform::FAT::LFN::ConvertToAlias() , 以及 ystdex::cpp2017::basic_string< char >::rfind().

这是这个函数的调用关系图:

## ◆ substr()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::substr | ( | size_type | pos = `0`,
|  | size_type | n = `npos`
| ) |  | const

inline

自从
  build 839

在文件 string.hpp 第 605 行定义.

## ◆ swap()

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

void ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::swap | ( | basic_string< _tChar, _tTraits, _tAlloc > & | s | ) |

inline

在文件 string.hpp 第 611 行定义.

## 友元及相关函数文档

## ◆ operator+ [1/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | _tChar | lhs,
|  | basic_string< _tChar, _tTraits, _tAlloc > && | rhs
| ) |  |

friend

在文件 string.hpp 第 744 行定义.

## ◆ operator+ [2/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | _tChar | lhs,
|  | const basic_string< _tChar, _tTraits, _tAlloc > & | rhs
| ) |  |

friend

在文件 string.hpp 第 739 行定义.

## ◆ operator+ [3/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | basic_string< _tChar, _tTraits, _tAlloc > && | lhs,
|  | _tChar | rhs
| ) |  |

friend

在文件 string.hpp 第 764 行定义.

## ◆ operator+ [4/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | basic_string< _tChar, _tTraits, _tAlloc > && | lhs,
|  | basic_string< _tChar, _tTraits, _tAlloc > && | rhs
| ) |  |

friend

在文件 string.hpp 第 724 行定义.

## ◆ operator+ [5/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | basic_string< _tChar, _tTraits, _tAlloc > && | lhs,
|  | const _tChar * | rhs
| ) |  |

friend

在文件 string.hpp 第 754 行定义.

## ◆ operator+ [6/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | basic_string< _tChar, _tTraits, _tAlloc > && | lhs,
|  | const basic_string< _tChar, _tTraits, _tAlloc > & | rhs
| ) |  |

friend

在文件 string.hpp 第 714 行定义.

## ◆ operator+ [7/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | const _tChar * | lhs,
|  | basic_string< _tChar, _tTraits, _tAlloc > && | rhs
| ) |  |

friend

在文件 string.hpp 第 734 行定义.

## ◆ operator+ [8/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | const _tChar * | lhs,
|  | const basic_string< _tChar, _tTraits, _tAlloc > & | rhs
| ) |  |

friend

在文件 string.hpp 第 729 行定义.

## ◆ operator+ [9/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | const basic_string< _tChar, _tTraits, _tAlloc > & | lhs,
|  | _tChar | rhs
| ) |  |

friend

在文件 string.hpp 第 759 行定义.

## ◆ operator+ [10/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | const basic_string< _tChar, _tTraits, _tAlloc > & | lhs,
|  | basic_string< _tChar, _tTraits, _tAlloc > && | rhs
| ) |  |

friend

在文件 string.hpp 第 719 行定义.

## ◆ operator+ [11/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | const basic_string< _tChar, _tTraits, _tAlloc > & | lhs,
|  | const _tChar * | rhs
| ) |  |

friend

在文件 string.hpp 第 749 行定义.

## ◆ operator+ [12/12]

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

basic_string operator+ | ( | const basic_string< _tChar, _tTraits, _tAlloc > & | lhs,
|  | const basic_string< _tChar, _tTraits, _tAlloc > & | rhs
| ) |  |

friend

在文件 string.hpp 第 709 行定义.

## ◆ swap

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

void swap | ( | basic_string< _tChar, _tTraits, _tAlloc > & | lhs,
|  | basic_string< _tChar, _tTraits, _tAlloc > & | rhs
| ) |  |

friend

自从
  build 834

在文件 string.hpp 第 618 行定义.

## 类成员变量说明

## ◆ npos

template<typename _tChar , class _tTraits = std::char_traits<_tChar>, class _tAlloc = std::allocator<_tChar>>

const auto ystdex::cpp2017::basic_string< _tChar, _tTraits, _tAlloc >::npos {static_cast<size_type>(-1)}

static

在文件 string.hpp 第 99 行定义.

该类的文档由以下文件生成:

- string.hpp