ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::string_n::string_t< char_T > 模板结构体 参考

class  arec_t
 
class  floating_arec_t_impl
 

Public 类型

typedef base_string_data_t< char_Tbase_t_w
 
typedef base_t_w::ptr_t ptr_t
 
typedef base_t_w::string_view_t string_view_t
 
typedef base_t_w::string_ptr_t string_ptr_t
 
typedef base_t_w::const_string_ptr_t const_string_ptr_t
 
typedef const constexpr_str_t< char_Tconstexpr_str_t
 
typedef string_t< char_Tthis_t
 
typedef char_T value_type
 
typedef value_type char_type
 
typedef size_t size_type
 
typedef iterator_t< char_T, iterator_base_t > iterator
 
typedef const_iterator_t< char_T, const iterator_base_t > const_iterator
 
typedef reverse_iterator_t< char_T, iterator_base_t > reverse_iterator
 
typedef reverse_const_iterator_t< char_T, const iterator_base_t > reverse_const_iterator
 

Public 成员函数

void swap_with (this_t &a) noexcept
 
constexpr string_t () noexcept
 
constexpr string_t (constexpr_str_t &str) noexcept
 
 string_t (string_view_t str) noexcept
 
 string_t (const_string_ptr_t str) noexcept
 
constexpr string_t (char_T ch) noexcept
 
 string_t (const string_t &str) noexcept
 
 string_t (string_t &&str) noexcept
 
 string_t (size_t size, char_T ch) noexcept
 
 string_t (char_T ch, size_t size) noexcept
 
 string_t (array_t< char_t > base) noexcept
 
 string_t (size_t size) noexcept
 
 ~string_t () noexcept
 
string_toperator= (const string_t &str) &noexcept
 
string_toperator= (string_t &&str) &noexcept
 
constexpr string_toperator= (constexpr_str_t &str) &noexcept
 
constexpr string_toperator= (char_T ch) &noexcept
 
string_t operator+ (const string_t &str) const noexcept
 
string_t operator+ (string_view_t str) const noexcept
 
string_t operator+ (const_string_ptr_t str) const noexcept
 
string_toperator+= (const string_t &str) &noexcept
 
string_toperator+= (string_t &&str) &noexcept
 
string_toperator+= (string_view_t str) &noexcept
 
string_toperator+= (const_string_ptr_t str) &noexcept
 
string_toperator+= (char_T ch) &noexcept
 
template<typename U >
requires (bool(requires{ *this+=b ;}))
string_t && operator+ (U &&b) &&noexcept(noexcept((*this+=b)))
 
float_size_t memory_cost () const noexcept
 
constexpr auto operator<=> (const string_t &a) const noexcept(compare.nothrow< char_T >)
 
constexpr auto operator== (const string_t &a) const noexcept(equal.nothrow< char_T >)
 
constexpr auto operator<=> (string_view_t a) const noexcept(compare.nothrow< char_T >)
 
constexpr auto operator== (string_view_t a) const noexcept(equal.nothrow< char_T >)
 
constexpr auto operator<=> (constexpr_str_t &a) const noexcept(compare.nothrow< char_T >)
 
constexpr auto operator== (constexpr_str_t &a) const noexcept(equal.nothrow< char_T >)
 
constexpr auto operator<=> (const_string_ptr_t a) const noexcept(compare.nothrow< char_T >)
 
constexpr auto operator== (const_string_ptr_t a) const noexcept(equal.nothrow< char_T >)
 
char_T arec (size_t index) noexcept
 
void arec_set (size_t index, char_T a) noexcept
 
arec_t operator[] (size_t index) noexcept
 
const arec_t operator[] (size_t index) const noexcept
 
arec_t front () noexcept
 
const arec_t front () const noexcept
 
arec_t back () noexcept
 
const arec_t back () const noexcept
 
string_t operator+ (const arec_t &&ch) const noexcept
 
string_toperator+= (const arec_t &&ch) &noexcept
 
auto operator[] (float_t index) noexcept
 
const auto operator[] (float_t index) const noexcept
 
template<arithmetic_type T>
auto operator[] (T index) noexcept
 
template<arithmetic_type T>
const auto operator[] (T index) const noexcept
 
string_t substr (size_t begin, size_t size=npos) const noexcept
 
const char_Tdata () const noexcept
 
char_Twriteable_data () noexcept
 
const_string_ptr_t c_str () const noexcept
 
string_ptr_t writeable_c_str () noexcept
 
size_t size () const noexcept
 
 operator bool () const noexcept
 
bool empty () const noexcept
 
size_t length () const noexcept
 
void resize (size_t nsize, char_T ch) noexcept
 
void resize (size_t nsize) noexcept
 
void clear () noexcept
 
iterator get_iterator_at (ptrdiff_t index) noexcept
 
const_iterator get_iterator_at (ptrdiff_t index) const noexcept
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
reverse_iterator get_reverse_iterator_at (ptrdiff_t index) noexcept
 
reverse_const_iterator get_reverse_iterator_at (ptrdiff_t index) const noexcept
 
reverse_iterator rbegin () noexcept
 
reverse_const_iterator rbegin () const noexcept
 
reverse_const_iterator rcbegin () const noexcept
 
reverse_iterator rend () noexcept
 
reverse_const_iterator rend () const noexcept
 
reverse_const_iterator rcend () const noexcept
 
 string_t (const_iterator begin, const_iterator end) noexcept
 
void push_back (const string_t &str) &noexcept
 
void push_back (string_t &&str) &noexcept
 
void push_back (string_view_t str) &noexcept
 
void push_back (char_T ch) &noexcept
 
void push_back (const arec_t &&ch) &noexcept
 
void push_back (const_string_ptr_t str) &noexcept
 
void push_back (char_T ch, size_t count) &noexcept
 
void push_back (const arec_t &&ch, size_t count) &noexcept
 
void push_front (const string_t &str) &noexcept
 
void push_front (string_t &&str) &noexcept
 
void push_front (string_view_t str) &noexcept
 
void push_front (char_T ch) &noexcept
 
void push_front (const arec_t &&ch) &noexcept
 
void push_front (const_string_ptr_t str) &noexcept
 
void push_front (char_T ch, size_t count) &noexcept
 
void push_front (const arec_t &&ch, size_t count) &noexcept
 
void remove_back (size_t size=1) noexcept
 
void remove_front (size_t size=1) noexcept
 
string_t pop_back (size_t size) noexcept
 
string_t pop_front (size_t size) noexcept
 
char_T pop_back () noexcept
 
char_T pop_front () noexcept
 
 operator string_view_t () const &noexcept
 
auto to_string_view_t () const &noexcept
 
auto view () &noexcept
 
auto view () const &noexcept
 
 operator hash_t () const noexcept
 
size_t find (const char_T ch) const noexcept(find_nothrow)
 
size_t find (const char_T ch, size_t begin) const noexcept(find_nothrow)
 
size_t reverse_find (const char_T ch) const noexcept(find_nothrow)
 
size_t find (string_view_t str, size_t begin=0) const noexcept(find_nothrow)
 
size_t reverse_find (string_view_t str) const noexcept(find_nothrow)
 
size_t find (constexpr_str_t &str, size_t begin=0) const noexcept(find_nothrow)
 
size_t reverse_find (constexpr_str_t &str) const noexcept(find_nothrow)
 
size_t find (const string_t &str, size_t begin=0) const noexcept(find_nothrow)
 
size_t reverse_find (const string_t &str) const noexcept(find_nothrow)
 
size_t find_first_of (string_view_t str) const noexcept(find_nothrow)
 
size_t find_first_of (constexpr_str_t &str) const noexcept(find_nothrow)
 
size_t find_first_of (const string_t &str) const noexcept(find_nothrow)
 
size_t find_first_of (const_string_ptr_t str) const noexcept(find_nothrow)
 
size_t find_first_of (char_T ch) const noexcept(find_nothrow)
 
size_t find_first_of (const arec_t &&ch) const noexcept(find_nothrow)
 
size_t find_first_not_of (string_view_t str) const noexcept(find_nothrow)
 
size_t find_first_not_of (constexpr_str_t &str) const noexcept(find_nothrow)
 
size_t find_first_not_of (const string_t &str) const noexcept(find_nothrow)
 
size_t find_first_not_of (const_string_ptr_t str) const noexcept(find_nothrow)
 
size_t find_first_not_of (char_T ch) const noexcept(find_nothrow)
 
size_t find_first_not_of (const arec_t &&ch) const noexcept(find_nothrow)
 
size_t find_last_of (string_view_t str) const noexcept(find_nothrow)
 
size_t find_last_of (constexpr_str_t &str) const noexcept(find_nothrow)
 
size_t find_last_of (const string_t &str) const noexcept(find_nothrow)
 
size_t find_last_of (const_string_ptr_t str) const noexcept(find_nothrow)
 
size_t find_last_of (char_T ch) const noexcept(find_nothrow)
 
size_t find_last_of (const arec_t &&ch) const noexcept(find_nothrow)
 
size_t find_last_not_of (string_view_t str) const noexcept(find_nothrow)
 
size_t find_last_not_of (constexpr_str_t &str) const noexcept(find_nothrow)
 
size_t find_last_not_of (const string_t &str) const noexcept(find_nothrow)
 
size_t find_last_not_of (const_string_ptr_t str) const noexcept(find_nothrow)
 
size_t find_last_not_of (char_T ch) const noexcept(find_nothrow)
 
size_t find_last_not_of (const arec_t &&ch) const noexcept(find_nothrow)
 
string_t arec (size_t index, char_T delimiter) const
 
string_t arec (size_t index, string_view_t delimiter_str) const
 
string_t arec (size_t index, const string_t &delimiter_str) const
 
string_t arec (size_t index, constexpr_str_t &delimiter_str) const
 
void erase (size_t pos, size_t size=1) &noexcept
 
void insert (size_t pos, const string_t &str) &noexcept
 
void insert (size_t pos, string_view_t str) &noexcept
 
void insert (size_t pos, const_string_ptr_t str) &noexcept
 
void insert (size_t pos, char_T ch) &noexcept
 
constexpr bool contains (string_view_t str) const noexcept
 
constexpr bool contains (constexpr_str_t &str) const noexcept
 
constexpr bool contains (const string_t &str) const noexcept
 
constexpr bool contains (char_T ch) const noexcept
 
constexpr bool contains (const_string_ptr_t str) const noexcept
 
constexpr bool starts_with (string_view_t str) const noexcept
 
constexpr bool starts_with (constexpr_str_t &str) const noexcept
 
constexpr bool starts_with (const string_t &str) const noexcept
 
constexpr bool starts_with (char_T ch) const noexcept
 
constexpr bool starts_with (const_string_ptr_t str) const noexcept
 
constexpr bool ends_with (string_view_t str) const noexcept
 
constexpr bool ends_with (constexpr_str_t &str) const noexcept
 
constexpr bool ends_with (const string_t &str) const noexcept
 
constexpr bool ends_with (char_T ch) const noexcept
 
constexpr bool ends_with (char_T ch, size_t count) const noexcept
 
constexpr bool ends_with (const_string_ptr_t str) const noexcept
 
this_tappend (size_t size, char_T ch) noexcept
 
this_t pad_left (size_t size, char_T ch) const noexcept
 
this_t pad_left (char_T ch, size_t size) const noexcept
 
this_t pad_right (size_t size, char_T ch) const noexcept
 
this_t pad_right (char_T ch, size_t size) const noexcept
 
void pre_alloc_before_begin (size_t size) noexcept
 
void pre_alloc_after_end (size_t size) noexcept
 
this_t replace (size_t pos, size_t size, const string_t &str) const noexcept
 
this_t replace (char_T ch, char_T ch2) const noexcept
 
this_t replace (char_T ch, const string_t &str) const noexcept
 
this_t replace (const string_t &str1, const string_t &str2) const noexcept
 

静态 Public 属性

static constexpr size_t npos = bit::npos
 
static constexpr bool floating_arec_able =floating_arec_result_able||floating_arec_set_able
 
static constexpr bool find_nothrow =equal.nothrow<char_T>
 

友元

string_t operator+ (string_view_t str1, const string_t &str2) noexcept
 
string_t operator+ (const_string_ptr_t str1, const string_t &str2) noexcept
 
string_t operator+ (char_T ch, const string_t &str) noexcept
 
template<class text_ostream_T >
requires (type_info<text_ostream_T>.base_on<text_ostream_t<char_T>>)
autooperator<< (text_ostream_T &os, const string_t &str) noexcept(noexcept_text_ostream_class< text_ostream_T >)
 
template<class text_istream_T >
requires (type_info<text_istream_T>.base_on<text_istream_t<char_T>>)
autooperator>> (text_istream_T &is, string_t &str) noexcept(noexcept_text_istream_class< text_istream_T >)
 
template<class text_istream_T >
requires (type_info<text_istream_T>.base_on<text_istream_t<char_T>>)
autogetline (text_istream_T &is, string_t &str) noexcept(noexcept_text_istream_class< text_istream_T >)
 

详细描述

template<typename char_T>
struct elc::defs::string_n::string_t< char_T >

在文件 all_defs.cpp38589 行定义.

成员类型定义说明

◆ base_t_w

◆ char_type

在文件 all_defs.cpp38600 行定义.

◆ const_iterator

template<typename char_T >
typedef const_iterator_t<char_T,const iterator_base_t> elc::defs::string_n::string_t< char_T >::const_iterator

在文件 all_defs.cpp39078 行定义.

◆ const_string_ptr_t

template<typename char_T >
typedef base_t_w::const_string_ptr_t elc::defs::string_n::string_t< char_T >::const_string_ptr_t

在文件 all_defs.cpp38596 行定义.

◆ constexpr_str_t

在文件 all_defs.cpp38597 行定义.

◆ iterator

template<typename char_T >
typedef iterator_t<char_T,iterator_base_t> elc::defs::string_n::string_t< char_T >::iterator

在文件 all_defs.cpp39077 行定义.

◆ ptr_t

template<typename char_T >
typedef base_t_w::ptr_t elc::defs::string_n::string_t< char_T >::ptr_t

在文件 all_defs.cpp38593 行定义.

◆ reverse_const_iterator

template<typename char_T >
typedef reverse_const_iterator_t<char_T,const iterator_base_t> elc::defs::string_n::string_t< char_T >::reverse_const_iterator

在文件 all_defs.cpp39090 行定义.

◆ reverse_iterator

template<typename char_T >
typedef reverse_iterator_t<char_T,iterator_base_t> elc::defs::string_n::string_t< char_T >::reverse_iterator

在文件 all_defs.cpp39089 行定义.

◆ size_type

template<typename char_T >
typedef size_t elc::defs::string_n::string_t< char_T >::size_type

在文件 all_defs.cpp38601 行定义.

◆ string_ptr_t

template<typename char_T >
typedef base_t_w::string_ptr_t elc::defs::string_n::string_t< char_T >::string_ptr_t

在文件 all_defs.cpp38595 行定义.

◆ string_view_t

template<typename char_T >
typedef base_t_w::string_view_t elc::defs::string_n::string_t< char_T >::string_view_t

在文件 all_defs.cpp38594 行定义.

◆ this_t

在文件 all_defs.cpp38598 行定义.

◆ value_type

在文件 all_defs.cpp38599 行定义.

构造及析构函数说明

◆ string_t() [1/12]

template<typename char_T >
constexpr elc::defs::string_n::string_t< char_T >::string_t ( )
inlineconstexprnoexcept

在文件 all_defs.cpp38716 行定义.

constexpr T down_cast(U a) noexcept
向下转型至
constexpr string_t() noexcept

◆ string_t() [2/12]

template<typename char_T >
constexpr elc::defs::string_n::string_t< char_T >::string_t ( constexpr_str_t str)
inlineconstexprnoexcept

在文件 all_defs.cpp38717 行定义.

38717{_cso_init(str);}

◆ string_t() [3/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( string_view_t  str)
inlinenoexcept

在文件 all_defs.cpp38718 行定义.

38718{_ncso_construct_mptr(get<comn_string_data_t<char_T>>(str));}

◆ string_t() [4/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( const_string_ptr_t  str)
inlinenoexcept

在文件 all_defs.cpp38719 行定义.

38719:string_t(string_view_t(str)){}
base_t_w::string_view_t string_view_t

◆ string_t() [5/12]

template<typename char_T >
constexpr elc::defs::string_n::string_t< char_T >::string_t ( char_T  ch)
inlineconstexprnoexcept

在文件 all_defs.cpp38720 行定义.

38720{_cso_init(ch);}

◆ string_t() [6/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( const string_t< char_T > &  str)
inlinenoexcept

在文件 all_defs.cpp38721 行定义.

38721 {
38722 if(str._in_cso()){
38723 _cso_info=str._cso_info;
38724 _cso_flags=str._cso_flags;
38725 }
38726 else
38727 _ncso_construct_mptr(str._m);
38728 }

◆ string_t() [7/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( string_t< char_T > &&  str)
inlinenoexcept

在文件 all_defs.cpp38729 行定义.

38729 :string_t(){
38730 swap_with(str);
38731 }
void swap_with(this_t &a) noexcept

◆ string_t() [8/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( size_t  size,
char_T  ch 
)
inlinenoexcept

在文件 all_defs.cpp38732 行定义.

38732{_ncso_construct_mptr(get<same_value_compress_string_data_t<char_T>>(size,ch));}
size_t size() const noexcept

◆ string_t() [9/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( char_T  ch,
size_t  size 
)
inlinenoexcept

在文件 all_defs.cpp38733 行定义.

38733:string_t(size,ch){}

◆ string_t() [10/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( array_t< char_t base)
inlinenoexcept

在文件 all_defs.cpp38734 行定义.

38734{_ncso_construct_mptr(get<comn_string_data_t<char_T>>(move(base)));}
constexpr struct elc::defs::memory::lifetime_n::move_t move

◆ string_t() [11/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( size_t  size)
inlinenoexcept

在文件 all_defs.cpp38736 行定义.

38736{_ncso_construct_mptr(get<comn_string_data_t<char_T>>(size));}

◆ ~string_t()

template<typename char_T >
elc::defs::string_n::string_t< char_T >::~string_t ( )
inlinenoexcept

在文件 all_defs.cpp38739 行定义.

38739{if(!_in_cso())_ncso_destruct_mptr();}

◆ string_t() [12/12]

template<typename char_T >
elc::defs::string_n::string_t< char_T >::string_t ( const_iterator  begin,
const_iterator  end 
)
inlinenoexcept

在文件 all_defs.cpp39102 行定义.

39102 {
39103 const auto& beg = begin.get_base();
39104 const auto& ed = end.get_base();
39105 if(beg._to!=ed._to)return;
39106 _ncso_construct_mptr(beg._to->substr(beg._index, ed._index - beg._index)._m);
39107 }
iterator begin() noexcept

成员函数说明

◆ append()

template<typename char_T >
this_t & elc::defs::string_n::string_t< char_T >::append ( size_t  size,
char_T  ch 
)
inlinenoexcept

在文件 all_defs.cpp39506 行定义.

39506 {
39507 return *this+=string_t{size,ch};
39508 }

◆ arec() [1/5]

template<typename char_T >
char_T elc::defs::string_n::string_t< char_T >::arec ( size_t  index)
inlinenoexcept

在文件 all_defs.cpp38874 行定义.

38874 {
38875 if(_in_cso())
38876 return _get_cso_data()[index];
38877 else
38878 return _m->arec(index);
38879 }
#define _m
这是这个函数的调用关系图:

◆ arec() [2/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::arec ( size_t  index,
char_T  delimiter 
) const
inline

在文件 all_defs.cpp39366 行定义.

39366 {
39367 auto pos=find(delimiter);
39368 auto end=find(delimiter,pos);
39369 while(index--){
39370 pos=end;
39372 }
39373 return substr(pos,end-pos);
39374 }
string_t substr(size_t begin, size_t size=npos) const noexcept
size_t find(const char_T ch) const noexcept(find_nothrow)

◆ arec() [3/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::arec ( size_t  index,
const string_t< char_T > &  delimiter_str 
) const
inline

在文件 all_defs.cpp39384 行定义.

39384 {
39385 auto pos=find(delimiter_str);
39386 auto end=find(delimiter_str,pos);
39387 while(index--){
39388 pos=end;
39390 }
39391 return substr(pos,end-pos);
39392 }

◆ arec() [4/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::arec ( size_t  index,
constexpr_str_t delimiter_str 
) const
inline

在文件 all_defs.cpp39393 行定义.

39393 {
39394 auto pos=find(delimiter_str);
39395 auto end=find(delimiter_str,pos);
39396 while(index--){
39397 pos=end;
39399 }
39400 return substr(pos,end-pos);
39401 }

◆ arec() [5/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::arec ( size_t  index,
string_view_t  delimiter_str 
) const
inline

在文件 all_defs.cpp39375 行定义.

39375 {
39376 auto pos=find(delimiter_str);
39377 auto end=find(delimiter_str,pos);
39378 while(index--){
39379 pos=end;
39381 }
39382 return substr(pos,end-pos);
39383 }

◆ arec_set()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::arec_set ( size_t  index,
char_T  a 
)
inlinenoexcept

在文件 all_defs.cpp38880 行定义.

38880{ _cso_check(1);return _m->arec_set(index,a,_m); }
这是这个函数的调用关系图:

◆ back() [1/2]

template<typename char_T >
const arec_t elc::defs::string_n::string_t< char_T >::back ( ) const
inlinenoexcept

在文件 all_defs.cpp38926 行定义.

38926{ return{remove_const(this),size()-1}; }
constexpr T & remove_const(const T &a) noexcept
对引用移除const
函数调用图:

◆ back() [2/2]

template<typename char_T >
arec_t elc::defs::string_n::string_t< char_T >::back ( )
inlinenoexcept

在文件 all_defs.cpp38925 行定义.

38925{ return{this,size()-1}; }

◆ begin() [1/2]

template<typename char_T >
const_iterator elc::defs::string_n::string_t< char_T >::begin ( ) const
inlinenoexcept

在文件 all_defs.cpp39083 行定义.

39083{ return get_iterator_at(0); }
iterator get_iterator_at(ptrdiff_t index) noexcept

◆ begin() [2/2]

template<typename char_T >
iterator elc::defs::string_n::string_t< char_T >::begin ( )
inlinenoexcept

在文件 all_defs.cpp39082 行定义.

39082{ return get_iterator_at(0); }
这是这个函数的调用关系图:

◆ c_str()

template<typename char_T >
const_string_ptr_t elc::defs::string_n::string_t< char_T >::c_str ( ) const
inlinenoexcept

在文件 all_defs.cpp39028 行定义.

39028{ if(_in_cso())return _get_cso_data();else return _m->get_const_c_str(_m); }

◆ cbegin()

template<typename char_T >
const_iterator elc::defs::string_n::string_t< char_T >::cbegin ( ) const
inlinenoexcept

在文件 all_defs.cpp39084 行定义.

39084{ return begin(); }
这是这个函数的调用关系图:

◆ cend()

template<typename char_T >
const_iterator elc::defs::string_n::string_t< char_T >::cend ( ) const
inlinenoexcept

在文件 all_defs.cpp39087 行定义.

39087{ return end(); }

◆ clear()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::clear ( )
inlinenoexcept

在文件 all_defs.cpp39060 行定义.

39060{ re_construct(this); }
constexpr struct elc::defs::memory::lifetime_n::re_construct_t re_construct

◆ contains() [1/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::contains ( char_T  ch) const
inlineconstexprnoexcept

在文件 all_defs.cpp39438 行定义.

39438 {
39439 return find(ch) != npos;
39440 }
static constexpr size_t npos

◆ contains() [2/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::contains ( const string_t< char_T > &  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39435 行定义.

39435 {
39436 return find(str) != npos;
39437 }

◆ contains() [3/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::contains ( const_string_ptr_t  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39441 行定义.

39441 {
39442 return find(str) != npos;
39443 }

◆ contains() [4/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::contains ( constexpr_str_t str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39432 行定义.

39432 {
39433 return find(str) != npos;
39434 }

◆ contains() [5/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::contains ( string_view_t  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39429 行定义.

39429 {
39430 return find(str) != npos;
39431 }

◆ data()

template<typename char_T >
const char_T * elc::defs::string_n::string_t< char_T >::data ( ) const
inlinenoexcept

在文件 all_defs.cpp39026 行定义.

39026{ if(_in_cso())return _get_cso_data();else return _m->get_data(_m); }

◆ empty()

template<typename char_T >
bool elc::defs::string_n::string_t< char_T >::empty ( ) const
inlinenoexcept

在文件 all_defs.cpp39032 行定义.

39032{ return !size(); }

◆ end() [1/2]

template<typename char_T >
const_iterator elc::defs::string_n::string_t< char_T >::end ( ) const
inlinenoexcept

在文件 all_defs.cpp39086 行定义.

39086{ return get_iterator_at(size()); }

◆ end() [2/2]

template<typename char_T >
iterator elc::defs::string_n::string_t< char_T >::end ( )
inlinenoexcept

在文件 all_defs.cpp39085 行定义.

39085{ return get_iterator_at(size()); }

◆ ends_with() [1/6]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::ends_with ( char_T  ch) const
inlineconstexprnoexcept

在文件 all_defs.cpp39492 行定义.

39492 {
39493 if(size()<1)
39494 return false;
39495 return operator[](size()-1) == ch;
39496 }
arec_t operator[](size_t index) noexcept

◆ ends_with() [2/6]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::ends_with ( char_T  ch,
size_t  count 
) const
inlineconstexprnoexcept

在文件 all_defs.cpp39497 行定义.

39497 {
39498 if(size() < count)
39499 return false;
39500 return find_last_not_of(ch) <= size()-count;
39501 }
size_t find_last_not_of(string_view_t str) const noexcept(find_nothrow)

◆ ends_with() [3/6]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::ends_with ( const string_t< char_T > &  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39484 行定义.

39484 {
39485 if(size()<str.size())
39486 return false;
39487 if(str._in_chr_cso())
39488 return ends_with(str._cso_info._ch);
39489 else
39490 return substr(size()-str.size()) == str;
39491 }
constexpr bool ends_with(string_view_t str) const noexcept

◆ ends_with() [4/6]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::ends_with ( const_string_ptr_t  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39502 行定义.

39502 {
39503 return ends_with(string_view_t{str});
39504 }

◆ ends_with() [5/6]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::ends_with ( constexpr_str_t str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39479 行定义.

39479 {
39480 if(size()<str.size())
39481 return false;
39482 return substr(size()-str.size()) == str;
39483 }

◆ ends_with() [6/6]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::ends_with ( string_view_t  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39474 行定义.

39474 {
39475 if(size()<str.size())
39476 return false;
39477 return substr(size()-str.size()) == str;
39478 }

◆ erase()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::erase ( size_t  pos,
size_t  size = 1 
) &
inlinenoexcept

在文件 all_defs.cpp39405 行定义.

39405 {
39406 _cso_check();_m=_m->do_erase(pos,size);
39407 }

◆ find() [1/5]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find ( const char_T  ch) const
inlinenoexcept

在文件 all_defs.cpp39207 行定义.

39207 {
39208 if(_in_cso()){
39209 if(_in_str_cso())
39210 return in_range_size_t(ch,_get_cso_constexpr_str());
39211 else//if(_in_cso())
39212 return _cso_info._ch==ch?0:npos;
39213 }
39215 }
constexpr size_t in_range_size_t(const remove_cvref< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
auto to_string_view_t() const &noexcept

◆ find() [2/5]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find ( const char_T  ch,
size_t  begin 
) const
inlinenoexcept

在文件 all_defs.cpp39216 行定义.

39216 {
39218 }

◆ find() [3/5]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find ( const string_t< char_T > &  str,
size_t  begin = 0 
) const
inlinenoexcept

在文件 all_defs.cpp39240 行定义.

39240 {
39241 if(str._in_cso()){
39242 if(str._in_str_cso())
39243 return find(str._get_cso_constexpr_str(),begin);
39244 else//if(str._in_cso())
39245 return find(str._cso_info._ch,begin);
39246 }
39247 auto result = str._m->get_match_pattern_from_self(str._m).match(to_string_view_t().substr(begin));
39248 if(result)
39249 return result - data();
39250 else
39251 return npos;
39252 }
const char_T * data() const noexcept

◆ find() [4/5]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find ( constexpr_str_t str,
size_t  begin = 0 
) const
inlinenoexcept

在文件 all_defs.cpp39234 行定义.

39234 {
39236 }

◆ find() [5/5]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find ( string_view_t  str,
size_t  begin = 0 
) const
inlinenoexcept

在文件 all_defs.cpp39228 行定义.

39228 {
39230 }

◆ find_first_not_of() [1/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_not_of ( char_T  ch) const
inlinenoexcept

在文件 all_defs.cpp39309 行定义.

39309 {
39311 }
size_t find_first_not_of(string_view_t str) const noexcept(find_nothrow)

◆ find_first_not_of() [2/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_not_of ( const arec_t &&  ch) const
inlinenoexcept

在文件 all_defs.cpp39312 行定义.

39312 {
39313 return find_first_not_of(string_view_t(move(ch).operator char_T()));
39314 }

◆ find_first_not_of() [3/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_not_of ( const string_t< char_T > &  str) const
inlinenoexcept

在文件 all_defs.cpp39297 行定义.

39297 {
39298 if(str._in_cso()){
39299 if(str._in_str_cso())
39300 return find_first_not_of(str._get_cso_constexpr_str());
39301 elseif(str._in_cso())
39302 return find_first_not_of(str.to_string_view_t());
39303 }
39304 return find_first_not_of(str.to_string_view_t());
39305 }
#define elseif
Definition all_defs.cpp:650

◆ find_first_not_of() [4/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_not_of ( const_string_ptr_t  str) const
inlinenoexcept

在文件 all_defs.cpp39306 行定义.

39306 {
39307 return find_first_not_of(string_view_t(str));
39308 }

◆ find_first_not_of() [5/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_not_of ( constexpr_str_t str) const
inlinenoexcept

在文件 all_defs.cpp39294 行定义.

39294 {
39296 }
constexpr size_t find_first_not_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到不匹配的数据项,返回其距离开头的步数,若未找到,返回npos

◆ find_first_not_of() [6/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_not_of ( string_view_t  str) const
inlinenoexcept

在文件 all_defs.cpp39291 行定义.

39291 {
39293 }

◆ find_first_of() [1/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_of ( char_T  ch) const
inlinenoexcept

在文件 all_defs.cpp39285 行定义.

39285 {
39286 return find(ch);
39287 }

◆ find_first_of() [2/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_of ( const arec_t &&  ch) const
inlinenoexcept

在文件 all_defs.cpp39288 行定义.

39288 {
39289 return find(move(ch).operator char_T());
39290 }

◆ find_first_of() [3/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_of ( const string_t< char_T > &  str) const
inlinenoexcept

在文件 all_defs.cpp39273 行定义.

39273 {
39274 if(str._in_cso()){
39275 if(str._in_str_cso())
39276 return find_first_of(str._get_cso_constexpr_str());
39277 elseif(str._in_cso())
39278 return find(str._cso_info._ch);
39279 }
39280 return find_first_of(str.to_string_view_t());
39281 }
size_t find_first_of(string_view_t str) const noexcept(find_nothrow)

◆ find_first_of() [4/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_of ( const_string_ptr_t  str) const
inlinenoexcept

在文件 all_defs.cpp39282 行定义.

39282 {
39283 return find_first_of(string_view_t(str));
39284 }

◆ find_first_of() [5/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_of ( constexpr_str_t str) const
inlinenoexcept

在文件 all_defs.cpp39270 行定义.

39270 {
39272 }
constexpr size_t find_first_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos

◆ find_first_of() [6/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_first_of ( string_view_t  str) const
inlinenoexcept

在文件 all_defs.cpp39267 行定义.

39267 {
39269 }

◆ find_last_not_of() [1/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_not_of ( char_T  ch) const
inlinenoexcept

在文件 all_defs.cpp39357 行定义.

39357 {
39358 return find_last_not_of(string_view_t{&ch,1});
39359 }

◆ find_last_not_of() [2/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_not_of ( const arec_t &&  ch) const
inlinenoexcept

在文件 all_defs.cpp39360 行定义.

39360 {
39361 return find_last_not_of(move(ch).operator char_T());
39362 }

◆ find_last_not_of() [3/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_not_of ( const string_t< char_T > &  str) const
inlinenoexcept

在文件 all_defs.cpp39345 行定义.

39345 {
39346 if(str._in_cso()){
39347 if(str._in_str_cso())
39348 return find_last_not_of(str._get_cso_constexpr_str());
39349 elseif(str._in_cso())
39350 return find_last_not_of(str.to_string_view_t());
39351 }
39352 return find_last_not_of(str.to_string_view_t());
39353 }

◆ find_last_not_of() [4/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_not_of ( const_string_ptr_t  str) const
inlinenoexcept

在文件 all_defs.cpp39354 行定义.

39354 {
39355 return find_last_not_of(string_view_t(str));
39356 }

◆ find_last_not_of() [5/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_not_of ( constexpr_str_t str) const
inlinenoexcept

在文件 all_defs.cpp39342 行定义.

39342 {
39344 }
constexpr size_t find_last_not_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到不匹配的数据项,返回其距离开头的步数,若未找到,返回npos

◆ find_last_not_of() [6/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_not_of ( string_view_t  str) const
inlinenoexcept

在文件 all_defs.cpp39339 行定义.

39339 {
39341 }

◆ find_last_of() [1/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_of ( char_T  ch) const
inlinenoexcept

在文件 all_defs.cpp39333 行定义.

39333 {
39334 return reverse_find(ch);
39335 }
size_t reverse_find(const char_T ch) const noexcept(find_nothrow)

◆ find_last_of() [2/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_of ( const arec_t &&  ch) const
inlinenoexcept

在文件 all_defs.cpp39336 行定义.

39336 {
39337 return reverse_find(move(ch).operator char_T());
39338 }

◆ find_last_of() [3/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_of ( const string_t< char_T > &  str) const
inlinenoexcept

在文件 all_defs.cpp39321 行定义.

39321 {
39322 if(str._in_cso()){
39323 if(str._in_str_cso())
39324 return find_last_of(str._get_cso_constexpr_str());
39325 elseif(str._in_cso())
39326 return reverse_find(str._cso_info._ch);
39327 }
39328 return find_last_of(str.to_string_view_t());
39329 }
size_t find_last_of(string_view_t str) const noexcept(find_nothrow)

◆ find_last_of() [4/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_of ( const_string_ptr_t  str) const
inlinenoexcept

在文件 all_defs.cpp39330 行定义.

39330 {
39331 return find_last_of(string_view_t(str));
39332 }

◆ find_last_of() [5/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_of ( constexpr_str_t str) const
inlinenoexcept

在文件 all_defs.cpp39318 行定义.

39318 {
39320 }
constexpr size_t find_last_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos

◆ find_last_of() [6/6]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::find_last_of ( string_view_t  str) const
inlinenoexcept

在文件 all_defs.cpp39315 行定义.

39315 {
39317 }

◆ front() [1/2]

template<typename char_T >
const arec_t elc::defs::string_n::string_t< char_T >::front ( ) const
inlinenoexcept

在文件 all_defs.cpp38923 行定义.

38923{ return{remove_const(this),0}; }
函数调用图:

◆ front() [2/2]

template<typename char_T >
arec_t elc::defs::string_n::string_t< char_T >::front ( )
inlinenoexcept

在文件 all_defs.cpp38922 行定义.

38922{ return{this,0}; }

◆ get_iterator_at() [1/2]

template<typename char_T >
const_iterator elc::defs::string_n::string_t< char_T >::get_iterator_at ( ptrdiff_t  index) const
inlinenoexcept

在文件 all_defs.cpp39081 行定义.

39081{ return get_iterator_data_at(index); }

◆ get_iterator_at() [2/2]

template<typename char_T >
iterator elc::defs::string_n::string_t< char_T >::get_iterator_at ( ptrdiff_t  index)
inlinenoexcept

在文件 all_defs.cpp39080 行定义.

39080{ return get_iterator_data_at(index); }

◆ get_reverse_iterator_at() [1/2]

template<typename char_T >
reverse_const_iterator elc::defs::string_n::string_t< char_T >::get_reverse_iterator_at ( ptrdiff_t  index) const
inlinenoexcept

在文件 all_defs.cpp39093 行定义.

39093{ return get_iterator_data_at(index); }

◆ get_reverse_iterator_at() [2/2]

template<typename char_T >
reverse_iterator elc::defs::string_n::string_t< char_T >::get_reverse_iterator_at ( ptrdiff_t  index)
inlinenoexcept

在文件 all_defs.cpp39092 行定义.

39092{ return get_iterator_data_at(index); }

◆ insert() [1/4]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::insert ( size_t  pos,
char_T  ch 
) &
inlinenoexcept

在文件 all_defs.cpp39422 行定义.

39422 {
39424 }
void insert(size_t pos, const string_t &str) &noexcept

◆ insert() [2/4]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::insert ( size_t  pos,
const string_t< char_T > &  str 
) &
inlinenoexcept

在文件 all_defs.cpp39408 行定义.

39408 {
39409 _cso_check();
39410 full_copy_cso_check(str);
39411 if(str._in_cso())
39412 _m=_m->do_insert(pos,str.to_string_view_t());
39413 else
39414 _m=_m->do_insert(pos,str);
39415 }

◆ insert() [3/4]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::insert ( size_t  pos,
const_string_ptr_t  str 
) &
inlinenoexcept

在文件 all_defs.cpp39419 行定义.

39419 {
39420 insert(pos,string_view_t(str));
39421 }

◆ insert() [4/4]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::insert ( size_t  pos,
string_view_t  str 
) &
inlinenoexcept

在文件 all_defs.cpp39416 行定义.

39416 {
39417 _cso_check();_m=_m->do_insert(pos,str);
39418 }

◆ length()

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::length ( ) const
inlinenoexcept

在文件 all_defs.cpp39033 行定义.

39033{ return size(); }

◆ memory_cost()

template<typename char_T >
float_size_t elc::defs::string_n::string_t< char_T >::memory_cost ( ) const
inlinenoexcept

在文件 all_defs.cpp38798 行定义.

38798 {
38799 if(_in_cso())
38800 return 0;
38801 else
38802 return _m->get_memory_cost();
38803 }

◆ operator bool()

template<typename char_T >
elc::defs::string_n::string_t< char_T >::operator bool ( ) const
inlineexplicitnoexcept

在文件 all_defs.cpp39031 行定义.

39031{ return size(); }

◆ operator hash_t()

template<typename char_T >
elc::defs::string_n::string_t< char_T >::operator hash_t ( ) const
inlineexplicitnoexcept

在文件 all_defs.cpp39203 行定义.

39203{ return _in_cso()?_get_cso_hash():_m->get_hash(_m); }

◆ operator string_view_t()

template<typename char_T >
elc::defs::string_n::string_t< char_T >::operator string_view_t ( ) const &
inlinenoexcept

在文件 all_defs.cpp39199 行定义.

39199{ return string_view_t{data(),size()}; }

◆ operator+() [1/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::operator+ ( const arec_t &&  ch) const
inlinenoexcept

在文件 all_defs.cpp38929 行定义.

38929 {
38930 return *this+move(ch).operator char_T();
38931 }

◆ operator+() [2/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::operator+ ( const string_t< char_T > &  str) const
inlinenoexcept

在文件 all_defs.cpp38749 行定义.

38749 {
38750 full_copy_cso_check(str);
38751 if(str._in_cso())
38752 return operator+(str.to_string_view_t());
38753 else
38754 return ptr_copy()->apply_str_to_end(str._m);
38755 }
friend string_t operator+(string_view_t str1, const string_t &str2) noexcept

◆ operator+() [3/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::operator+ ( const_string_ptr_t  str) const
inlinenoexcept

在文件 all_defs.cpp38759 行定义.

38759 {
38760 return *this+string_view_t(str);
38761 }

◆ operator+() [4/5]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::operator+ ( string_view_t  str) const
inlinenoexcept

在文件 all_defs.cpp38756 行定义.

38756 {
38757 return ptr_copy()->apply_str_to_end(str);
38758 }

◆ operator+() [5/5]

template<typename char_T >
template<typename U >
requires (bool(requires{ *this+=b ;}))
string_t && elc::defs::string_n::string_t< char_T >::operator+ ( U &&  b) &&
inlinenoexcept

在文件 all_defs.cpp38791 行定义.

38791 { //对右值的operator+优化为operator+=
38792 *this+=forward<U>(b);
38793 return move(*this);
38794 }

◆ operator+=() [1/6]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator+= ( char_T  ch) &
inlinenoexcept

在文件 all_defs.cpp38787 行定义.

38787 {
38788 return *this += string_view_t{&ch,1};
38789 }

◆ operator+=() [2/6]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator+= ( const arec_t &&  ch) &
inlinenoexcept

在文件 all_defs.cpp38932 行定义.

38932 {
38933 return *this+=move(ch).operator char_T();
38934 }

◆ operator+=() [3/6]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator+= ( const string_t< char_T > &  str) &
inlinenoexcept

在文件 all_defs.cpp38772 行定义.

38772 {
38773 push_back(str);
38774 return *this;
38775 }
void push_back(const string_t &str) &noexcept

◆ operator+=() [4/6]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator+= ( const_string_ptr_t  str) &
inlinenoexcept

在文件 all_defs.cpp38784 行定义.

38784 {
38785 return *this+=string_view_t(str);
38786 }

◆ operator+=() [5/6]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator+= ( string_t< char_T > &&  str) &
inlinenoexcept

在文件 all_defs.cpp38776 行定义.

38776 {
38777 push_back(move(str));
38778 return *this;
38779 }

◆ operator+=() [6/6]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator+= ( string_view_t  str) &
inlinenoexcept

在文件 all_defs.cpp38780 行定义.

38780 {
38781 push_back(str);
38782 return *this;
38783 }

◆ operator<=>() [1/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator<=> ( const string_t< char_T > &  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38806 行定义.

38806 {
38807 if(a._in_str_cso())
38808 return operator<=>(a._get_cso_constexpr_str());
38809 elseif(a._in_cso())
38810 return operator<=>(a.to_string_view_t());
38811 if(!_in_cso())
38812 return _m->compare_with(a._m);
38813 elseif(_in_str_cso())
38814 return compare.reverse(a<=>_get_cso_constexpr_str());
38815 else
38816 return compare.reverse(a<=>to_string_view_t());
38817 }
else
constexpr struct elc::defs::base::compare_t compare
constexpr auto operator<=>(const string_t &a) const noexcept(compare.nothrow< char_T >)
函数调用图:

◆ operator<=>() [2/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator<=> ( const_string_ptr_t  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38858 行定义.

38858 {
38859 if(_in_cso())
38860 return compare(data(),size(),a,end_by_zero);
38861 else
38862 return _m->compare_with(a);
38863 }
constexpr struct elc::defs::base::end_by_zero_t end_by_zero

◆ operator<=>() [3/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator<=> ( constexpr_str_t a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38842 行定义.

38842 {
38843 if(_in_cso() && data()==a.str())//同起始优化
38844 return strong_ordering::equivalent;
38846 if(tmp==0)
38847 remove_const(this)->_cso_reinit(a);
38848 return tmp;
38849 }
函数调用图:

◆ operator<=>() [4/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator<=> ( string_view_t  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38830 行定义.

38830 {
38831 if(_in_cso())
38832 return compare(data(),a.begin(),size());
38833 else
38834 return _m->compare_with(a);
38835 }

◆ operator=() [1/4]

template<typename char_T >
constexpr string_t & elc::defs::string_n::string_t< char_T >::operator= ( char_T  ch) &
inlineconstexprnoexcept

在文件 all_defs.cpp38745 行定义.

38745{_cso_reinit(ch);return*this;}

◆ operator=() [2/4]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator= ( const string_t< char_T > &  str) &
inlinenoexcept

在文件 all_defs.cpp38742 行定义.

38742{re_construct[this](str);return*this;}

◆ operator=() [3/4]

template<typename char_T >
constexpr string_t & elc::defs::string_n::string_t< char_T >::operator= ( constexpr_str_t str) &
inlineconstexprnoexcept

在文件 all_defs.cpp38744 行定义.

38744{_cso_reinit(str);return*this;}

◆ operator=() [4/4]

template<typename char_T >
string_t & elc::defs::string_n::string_t< char_T >::operator= ( string_t< char_T > &&  str) &
inlinenoexcept

在文件 all_defs.cpp38743 行定义.

38743{swap_with(str);return*this;}

◆ operator==() [1/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator== ( const string_t< char_T > &  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38818 行定义.

38818 {
38819 if(a._in_str_cso())
38820 return operator==(a._get_cso_constexpr_str());
38821 elseif(a._in_cso())
38822 return operator==(a.to_string_view_t());
38823 if(!_in_cso())
38824 return _m->equal_with(a._m);
38825 elseif(_in_str_cso())
38826 return a==_get_cso_constexpr_str();
38827 else
38829 }
constexpr auto operator==(const string_t &a) const noexcept(equal.nothrow< char_T >)
函数调用图:

◆ operator==() [2/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator== ( const_string_ptr_t  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38864 行定义.

38864 {
38865 if(_in_cso())
38866 return equal(data(),size(),a,end_by_zero);
38867 else
38868 return _m->equal_with(a);
38869 }
constexpr struct elc::defs::base::equal_t equal

◆ operator==() [3/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator== ( constexpr_str_t a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38850 行定义.

38850 {
38851 if(_in_cso() && data()==a.str())//同起始优化
38852 return true;
38853 const auto tmp=operator==((string_view_t&)a);
38854 if(tmp)
38855 remove_const(this)->_cso_reinit(a);
38856 return tmp;
38857 }
函数调用图:

◆ operator==() [4/4]

template<typename char_T >
constexpr auto elc::defs::string_n::string_t< char_T >::operator== ( string_view_t  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp38836 行定义.

38836 {
38837 if(_in_cso())
38838 return equal(data(),a.begin(),size());
38839 else
38840 return _m->equal_with(a);
38841 }

◆ operator[]() [1/6]

template<typename char_T >
const auto elc::defs::string_n::string_t< char_T >::operator[] ( float_t  index) const
inlinenoexcept

在文件 all_defs.cpp38998 行定义.

38998{ return floating_arec_t{remove_const(this),index}; }
#define floating_arec_t
函数调用图:

◆ operator[]() [2/6]

template<typename char_T >
auto elc::defs::string_n::string_t< char_T >::operator[] ( float_t  index)
inlinenoexcept

在文件 all_defs.cpp38997 行定义.

38997{ return floating_arec_t{this,index}; }

◆ operator[]() [3/6]

template<typename char_T >
const arec_t elc::defs::string_n::string_t< char_T >::operator[] ( size_t  index) const
inlinenoexcept

在文件 all_defs.cpp38919 行定义.

38919{ return{remove_const(this),index}; }
函数调用图:

◆ operator[]() [4/6]

template<typename char_T >
arec_t elc::defs::string_n::string_t< char_T >::operator[] ( size_t  index)
inlinenoexcept

在文件 all_defs.cpp38918 行定义.

38918{ return{this,index}; }

◆ operator[]() [5/6]

template<typename char_T >
template<arithmetic_type T>
const auto elc::defs::string_n::string_t< char_T >::operator[] ( index) const
inlinenoexcept

在文件 all_defs.cpp39010 行定义.

39010 {
39011 if constexpr(float_type<T>)
39012 return operator[](static_cast<float_t>(index));
39013 else
39014 return operator[](static_cast<size_t>(index));
39015 }
double float_t
Definition all_defs.cpp:361

◆ operator[]() [6/6]

template<typename char_T >
template<arithmetic_type T>
auto elc::defs::string_n::string_t< char_T >::operator[] ( index)
inlinenoexcept

在文件 all_defs.cpp39003 行定义.

39003 {
39004 if constexpr(float_type<T>)
39005 return operator[](static_cast<float_t>(index));
39006 else
39007 return operator[](static_cast<size_t>(index));
39008 }

◆ pad_left() [1/2]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::pad_left ( char_T  ch,
size_t  size 
) const
inlinenoexcept

在文件 all_defs.cpp39516 行定义.

39516 {
39517 return pad_left(size,ch);
39518 }
this_t pad_left(size_t size, char_T ch) const noexcept

◆ pad_left() [2/2]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::pad_left ( size_t  size,
char_T  ch 
) const
inlinenoexcept

在文件 all_defs.cpp39511 行定义.

39511 {
39512 if(size<=this->size())
39513 return *this;
39514 return string_t{size-this->size(),ch}+*this;
39515 }

◆ pad_right() [1/2]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::pad_right ( char_T  ch,
size_t  size 
) const
inlinenoexcept

在文件 all_defs.cpp39525 行定义.

39525 {
39526 return pad_right(size,ch);
39527 }
this_t pad_right(size_t size, char_T ch) const noexcept

◆ pad_right() [2/2]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::pad_right ( size_t  size,
char_T  ch 
) const
inlinenoexcept

在文件 all_defs.cpp39520 行定义.

39520 {
39521 if(size<=this->size())
39522 return *this;
39523 return *this+string_t{size-this->size(),ch};
39524 }

◆ pop_back() [1/2]

template<typename char_T >
char_T elc::defs::string_n::string_t< char_T >::pop_back ( )
inlinenoexcept

在文件 all_defs.cpp39193 行定义.

39193{ return pop_back(1)[0]; }
函数调用图:
这是这个函数的调用关系图:

◆ pop_back() [2/2]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::pop_back ( size_t  size)
inlinenoexcept

在文件 all_defs.cpp39191 行定义.

39191{ _cso_check();return _m->do_pop_back(size,_m); }

◆ pop_front() [1/2]

template<typename char_T >
char_T elc::defs::string_n::string_t< char_T >::pop_front ( )
inlinenoexcept

在文件 all_defs.cpp39194 行定义.

39194{ return pop_front(1)[0]; }
函数调用图:
这是这个函数的调用关系图:

◆ pop_front() [2/2]

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::pop_front ( size_t  size)
inlinenoexcept

在文件 all_defs.cpp39192 行定义.

39192{ _cso_check();return _m->do_pop_front(size,_m); }

◆ pre_alloc_after_end()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::pre_alloc_after_end ( size_t  size)
inlinenoexcept

在文件 all_defs.cpp39534 行定义.

39534 {
39535 _cso_check();
39536 _m=_m->pre_alloc_after_end(size);
39537 }

◆ pre_alloc_before_begin()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::pre_alloc_before_begin ( size_t  size)
inlinenoexcept

在文件 all_defs.cpp39530 行定义.

39530 {
39531 _cso_check();
39532 _m=_m->pre_alloc_before_begin(size);
39533 }

◆ push_back() [1/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( char_T  ch) &
inlinenoexcept

在文件 all_defs.cpp39135 行定义.

39135{ push_back(string_view_t{&ch,1}); }
函数调用图:
这是这个函数的调用关系图:

◆ push_back() [2/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( char_T  ch,
size_t  count 
) &
inlinenoexcept

在文件 all_defs.cpp39139 行定义.

39139 {
39140 if(count==0)return;
39141 _cso_check();
39142 string_t str{ch,count};
39143 _m=_m->apply_str_to_end(str._m);
39144 }

◆ push_back() [3/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( const arec_t &&  ch) &
inlinenoexcept

在文件 all_defs.cpp39136 行定义.

39136{ push_back(move(ch).operator char_T()); }
函数调用图:
这是这个函数的调用关系图:

◆ push_back() [4/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( const arec_t &&  ch,
size_t  count 
) &
inlinenoexcept

在文件 all_defs.cpp39145 行定义.

39145 {
39146 push_back(move(ch).operator char_T(),count);
39147 }

◆ push_back() [5/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( const string_t< char_T > &  str) &
inlinenoexcept

在文件 all_defs.cpp39110 行定义.

39110 {
39111 full_copy_cso_check(*this);
39112 full_copy_cso_check(str);
39113 if(_in_cso()&&!str._in_cso())
39114 _cso_fin(str._m->apply_str_to_begin(to_string_view_t()));
39115 elseif(str._in_cso())
39117 else{
39118 _cso_check();
39119 _m=_m->apply_str_to_end(str._m);
39120 }
39121 }

◆ push_back() [6/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( const_string_ptr_t  str) &
inlinenoexcept

在文件 all_defs.cpp39137 行定义.

39137{ push_back(string_view_t(str)); }
函数调用图:
这是这个函数的调用关系图:

◆ push_back() [7/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( string_t< char_T > &&  str) &
inlinenoexcept

在文件 all_defs.cpp39122 行定义.

39122 {
39123 full_copy_cso_check(*this);
39124 full_copy_cso_check(str);
39125 if(_in_cso()&&!str._in_cso())
39126 _cso_fin(str._m->apply_str_to_begin(to_string_view_t()));
39127 elseif(str._in_cso())
39129 else{
39130 _cso_check();
39131 _m=_m->apply_str_to_end(move(str._m));
39132 }
39133 }

◆ push_back() [8/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_back ( string_view_t  str) &
inlinenoexcept

在文件 all_defs.cpp39134 行定义.

39134{ _cso_check();_m=_m->apply_str_to_end(str); }

◆ push_front() [1/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( char_T  ch) &
inlinenoexcept

在文件 all_defs.cpp39174 行定义.

39174{ push_front(string_view_t{&ch,1}); }
void push_front(const string_t &str) &noexcept
函数调用图:
这是这个函数的调用关系图:

◆ push_front() [2/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( char_T  ch,
size_t  count 
) &
inlinenoexcept

在文件 all_defs.cpp39178 行定义.

39178 {
39179 if(count==0)return;
39180 _cso_check();
39181 string_t str{ch,count};
39182 _m=_m->apply_str_to_begin(str._m);
39183 }

◆ push_front() [3/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( const arec_t &&  ch) &
inlinenoexcept

在文件 all_defs.cpp39175 行定义.

39175{ push_front(move(ch).operator char_T()); }
函数调用图:
这是这个函数的调用关系图:

◆ push_front() [4/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( const arec_t &&  ch,
size_t  count 
) &
inlinenoexcept

在文件 all_defs.cpp39184 行定义.

39184 {
39185 push_front(move(ch).operator char_T(),count);
39186 }

◆ push_front() [5/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( const string_t< char_T > &  str) &
inlinenoexcept

在文件 all_defs.cpp39149 行定义.

39149 {
39150 full_copy_cso_check(*this);
39151 full_copy_cso_check(str);
39152 if(_in_cso()&&!str._in_cso())
39153 _cso_fin(str._m->apply_str_to_end(to_string_view_t()));
39154 elseif(str._in_cso())
39156 else{
39157 _cso_check();
39158 _m=_m->apply_str_to_begin(str._m);
39159 }
39160 }

◆ push_front() [6/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( const_string_ptr_t  str) &
inlinenoexcept

在文件 all_defs.cpp39176 行定义.

39176{ push_front(string_view_t(str)); }
函数调用图:
这是这个函数的调用关系图:

◆ push_front() [7/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( string_t< char_T > &&  str) &
inlinenoexcept

在文件 all_defs.cpp39161 行定义.

39161 {
39162 full_copy_cso_check(*this);
39163 full_copy_cso_check(str);
39164 if(_in_cso()&&!str._in_cso())
39165 _cso_fin(str._m->apply_str_to_end(to_string_view_t()));
39166 elseif(str._in_cso())
39168 else{
39169 _cso_check();
39170 _m=_m->apply_str_to_begin(move(str._m));
39171 }
39172 }

◆ push_front() [8/8]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::push_front ( string_view_t  str) &
inlinenoexcept

在文件 all_defs.cpp39173 行定义.

39173{ _cso_check();_m=_m->apply_str_to_begin(str); }

◆ rbegin() [1/2]

template<typename char_T >
reverse_const_iterator elc::defs::string_n::string_t< char_T >::rbegin ( ) const
inlinenoexcept

在文件 all_defs.cpp39095 行定义.

39095{ return get_reverse_iterator_at(size()-1); }
reverse_iterator get_reverse_iterator_at(ptrdiff_t index) noexcept

◆ rbegin() [2/2]

template<typename char_T >
reverse_iterator elc::defs::string_n::string_t< char_T >::rbegin ( )
inlinenoexcept

在文件 all_defs.cpp39094 行定义.

39094{ return get_reverse_iterator_at(size()-1); }

◆ rcbegin()

template<typename char_T >
reverse_const_iterator elc::defs::string_n::string_t< char_T >::rcbegin ( ) const
inlinenoexcept

在文件 all_defs.cpp39096 行定义.

39096{ return rbegin(); }
reverse_iterator rbegin() noexcept

◆ rcend()

template<typename char_T >
reverse_const_iterator elc::defs::string_n::string_t< char_T >::rcend ( ) const
inlinenoexcept

在文件 all_defs.cpp39099 行定义.

39099{ return rend(); }
reverse_iterator rend() noexcept

◆ remove_back()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::remove_back ( size_t  size = 1)
inlinenoexcept

在文件 all_defs.cpp39188 行定义.

39188{ _cso_check();_m=_m->do_remove_back(size); }

◆ remove_front()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::remove_front ( size_t  size = 1)
inlinenoexcept

在文件 all_defs.cpp39189 行定义.

39189{ _cso_check();_m=_m->do_remove_front(size); }

◆ rend() [1/2]

template<typename char_T >
reverse_const_iterator elc::defs::string_n::string_t< char_T >::rend ( ) const
inlinenoexcept

在文件 all_defs.cpp39098 行定义.

39098{ return get_reverse_iterator_at(-1); }

◆ rend() [2/2]

template<typename char_T >
reverse_iterator elc::defs::string_n::string_t< char_T >::rend ( )
inlinenoexcept

在文件 all_defs.cpp39097 行定义.

39097{ return get_reverse_iterator_at(-1); }

◆ replace() [1/4]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::replace ( char_T  ch,
char_T  ch2 
) const
inlinenoexcept

在文件 all_defs.cpp39548 行定义.

39548 {
39549 this_t aret;
39550 size_t pos=0;
39551 floop{
39552 auto pos2=find(ch,pos);
39553 if(pos2==npos)
39554 break;
39556 pos=pos2+1;
39557 }
39558 aret+=substr(pos);
39559 return aret;
39560 }
#define floop
Definition all_defs.cpp:543

◆ replace() [2/4]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::replace ( char_T  ch,
const string_t< char_T > &  str 
) const
inlinenoexcept

在文件 all_defs.cpp39561 行定义.

39561 {
39562 this_t aret;
39563 size_t pos=0;
39564 floop{
39565 auto pos2=find(ch,pos);
39566 if(pos2==npos)
39567 break;
39568 aret+=substr(pos,pos2-pos)+str;
39569 pos=pos2+1;
39570 }
39571 aret+=substr(pos);
39572 return aret;
39573 }

◆ replace() [3/4]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::replace ( const string_t< char_T > &  str1,
const string_t< char_T > &  str2 
) const
inlinenoexcept

在文件 all_defs.cpp39574 行定义.

39574 {
39575 this_t aret;
39576 size_t pos=0;
39577 floop{
39578 auto pos2=find(str1,pos);
39579 if(pos2==npos)
39580 break;
39582 pos=pos2+str1.size();
39583 }
39584 aret+=substr(pos);
39585 return aret;
39586 }
函数调用图:

◆ replace() [4/4]

template<typename char_T >
this_t elc::defs::string_n::string_t< char_T >::replace ( size_t  pos,
size_t  size,
const string_t< char_T > &  str 
) const
inlinenoexcept

在文件 all_defs.cpp39545 行定义.

39545 {
39546 return substr(0,pos)+str+substr(pos+size);
39547 }

◆ resize() [1/2]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::resize ( size_t  nsize)
inlinenoexcept

在文件 all_defs.cpp39047 行定义.

39047 {
39048 const auto size=this->size();
39049 if(size > nsize)
39050 *this=substr(0,nsize);
39051 elseif(size == nsize)
39052 return;
39053 elseif(size){
39054 _cso_check();
39056 }
39057 else
39058 *this=string_t{nsize};
39059 }

◆ resize() [2/2]

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::resize ( size_t  nsize,
char_T  ch 
)
inlinenoexcept

在文件 all_defs.cpp39034 行定义.

39034 {
39035 const auto size=this->size();
39036 if(size > nsize)
39037 *this=substr(0,nsize);
39038 elseif(size == nsize)
39039 return;
39040 elseif(size){
39041 _cso_check();
39043 }
39044 else
39045 *this=string_t{nsize,ch};
39046 }

◆ reverse_find() [1/4]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::reverse_find ( const char_T  ch) const
inlinenoexcept

在文件 all_defs.cpp39219 行定义.

39219 {
39220 if(_in_cso()){
39221 if(_in_str_cso())
39222 return in_range_but_reverse_size_t(ch,_get_cso_constexpr_str());
39223 else//if(_in_cso())
39224 return _cso_info._ch==ch?0:npos;
39225 }
39227 }
constexpr size_t in_range_but_reverse_size_t(const remove_cvref< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos

◆ reverse_find() [2/4]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::reverse_find ( const string_t< char_T > &  str) const
inlinenoexcept

在文件 all_defs.cpp39253 行定义.

39253 {
39254 if(str._in_cso()){
39255 if(str._in_str_cso())
39256 return reverse_find(str._get_cso_constexpr_str());
39257 elseif(str._in_cso())
39258 return reverse_find(str._cso_info._ch);
39259 }
39260 auto result = str._m->get_reverse_match_pattern_from_self(str._m).match(to_string_view_t());
39261 if(result)
39262 return result - data();
39263 else
39264 return npos;
39265 }

◆ reverse_find() [3/4]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::reverse_find ( constexpr_str_t str) const
inlinenoexcept

在文件 all_defs.cpp39237 行定义.

39237 {
39239 }

◆ reverse_find() [4/4]

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::reverse_find ( string_view_t  str) const
inlinenoexcept

在文件 all_defs.cpp39231 行定义.

39231 {
39233 }

◆ size()

template<typename char_T >
size_t elc::defs::string_n::string_t< char_T >::size ( ) const
inlinenoexcept

在文件 all_defs.cpp39030 行定义.

39030{ if(_in_cso())return _get_cso_size();else return _m->get_size(); }
这是这个函数的调用关系图:

◆ starts_with() [1/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::starts_with ( char_T  ch) const
inlineconstexprnoexcept

在文件 all_defs.cpp39464 行定义.

39464 {
39465 if(size()<1)
39466 return false;
39467 return operator[](0) == ch;
39468 }

◆ starts_with() [2/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::starts_with ( const string_t< char_T > &  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39456 行定义.

39456 {
39457 if(size()<str.size())
39458 return false;
39459 if(str._in_chr_cso())
39460 return starts_with(str._cso_info._ch);
39461 else
39462 return substr(0,str.size()) == str;
39463 }
constexpr bool starts_with(string_view_t str) const noexcept

◆ starts_with() [3/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::starts_with ( const_string_ptr_t  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39469 行定义.

39469 {
39470 return starts_with(string_view_t{str});
39471 }

◆ starts_with() [4/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::starts_with ( constexpr_str_t str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39451 行定义.

39451 {
39452 if(size()<str.size())
39453 return false;
39454 return substr(0,str.size()) == str;
39455 }

◆ starts_with() [5/5]

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::starts_with ( string_view_t  str) const
inlineconstexprnoexcept

在文件 all_defs.cpp39446 行定义.

39446 {
39447 if(size()<str.size())
39448 return false;
39449 return substr(0,str.size()) == str;
39450 }

◆ substr()

template<typename char_T >
string_t elc::defs::string_n::string_t< char_T >::substr ( size_t  begin,
size_t  size = npos 
) const
inlinenoexcept

在文件 all_defs.cpp39017 行定义.

39017 {
39018 size=min(size,this->size()-begin);
39019 if(size){
39020 _cso_check();
39021 return _m->get_substr_data(begin,size);
39022 }
39023 else
39024 return{};
39025 }
constexpr struct elc::defs::base::min_t min

◆ swap_with()

template<typename char_T >
void elc::defs::string_n::string_t< char_T >::swap_with ( this_t a)
inlinenoexcept

在文件 all_defs.cpp38706 行定义.

38706 {
38707 if(_in_cso()||a._in_cso()){
38708 swap(_cso_info,a._cso_info);
38709 swap(_cso_flags,a._cso_flags);
38710 }
38711 else
38712 swap(_m,a._m);
38713 }
void swap(string_t< T > &a, string_t< T > &b) noexcept
函数调用图:

◆ to_string_view_t()

template<typename char_T >
auto elc::defs::string_n::string_t< char_T >::to_string_view_t ( ) const &
inlinenoexcept

在文件 all_defs.cpp39200 行定义.

39200{ return operator string_view_t(); }

◆ view() [1/2]

template<typename char_T >
auto elc::defs::string_n::string_t< char_T >::view ( ) &
inlinenoexcept

在文件 all_defs.cpp39201 行定义.

char_T * writeable_data() noexcept

◆ view() [2/2]

template<typename char_T >
auto elc::defs::string_n::string_t< char_T >::view ( ) const &
inlinenoexcept

在文件 all_defs.cpp39202 行定义.

39202{ return array_like_view_t<const char_T>{data(),size()}; }

◆ writeable_c_str()

template<typename char_T >
string_ptr_t elc::defs::string_n::string_t< char_T >::writeable_c_str ( )
inlinenoexcept

在文件 all_defs.cpp39029 行定义.

39029{ return unique_c_str(); }

◆ writeable_data()

template<typename char_T >
char_T * elc::defs::string_n::string_t< char_T >::writeable_data ( )
inlinenoexcept

在文件 all_defs.cpp39027 行定义.

39027{ return unique_c_str(); }

友元及相关函数文档

◆ getline

template<typename char_T >
auto & getline ( text_istream_T is,
string_t< char_T > &  str 
)
friend

在文件 all_defs.cpp39642 行定义.

39642 {
39643 str.clear();
39644 using namespace char_set;
39645 while(isspace(is.peek()))
39646 is.get();
39647 /*/
39648 size_t insert_pos=0;
39649 while(!is.is_end()){
39650 const auto c=is.peek();
39651 switch (c){
39652 case char_T(38)://right
39653 is.get();
39654 if(insert_pos<str.size())
39655 insert_pos++;
39656 break;
39657 case char_T(37)://left
39658 is.get();
39659 if(insert_pos>0)
39660 insert_pos--;
39661 break;
39662 case char_T(8)://backspace
39663 is.get();
39664 if(insert_pos>0)
39665 str.erase(--insert_pos);
39666 break;
39667 case char_T('\r'):
39668 case char_T('\n'):
39669 is>>endline;//处理结尾
39670 return str;
39671 default:
39672 str.push_back(is.get());
39673 break;
39674 }
39675 }
39676 /*/
39677 while(!is.is_end()&&is.peek()!='\r'&&is.peek()!='\n')
39678 str+=is.get();
39679 //*/
39680 is>>endline;//处理结尾
39681 return str;
39682 }
constexpr bool isspace(char_t c) noexcept
constexpr struct elc::defs::stream_n::endline_t endline

◆ operator+ [1/3]

template<typename char_T >
string_t operator+ ( char_T  ch,
const string_t< char_T > &  str 
)
friend

在文件 all_defs.cpp38768 行定义.

38768 {
38769 return string_view_t{&ch,1}+str;
38770 }

◆ operator+ [2/3]

template<typename char_T >
string_t operator+ ( const_string_ptr_t  str1,
const string_t< char_T > &  str2 
)
friend

在文件 all_defs.cpp38765 行定义.

38765 {
38766 return string_view_t(str1)+str2;
38767 }

◆ operator+ [3/3]

template<typename char_T >
string_t operator+ ( string_view_t  str1,
const string_t< char_T > &  str2 
)
friend

在文件 all_defs.cpp38762 行定义.

38762 {
38763 return str2.ptr_copy()->apply_str_to_begin(str1);
38764 }

◆ operator<<

template<typename char_T >
auto & operator<< ( text_ostream_T os,
const string_t< char_T > &  str 
)
friend

在文件 all_defs.cpp39590 行定义.

39590 {
39591 if(str._in_cso())
39592 os<<str.to_string_view_t();
39593 else{
39594 push_and_disable_msvc_warning(26447);//nothrow警告diss
39595 str._m->do_output(os);
39597 }
39598 return os;
39599 }
#define pop_msvc_warning()
Definition all_defs.cpp:478
#define push_and_disable_msvc_warning(...)
Definition all_defs.cpp:479

◆ operator>>

template<typename char_T >
auto & operator>> ( text_istream_T is,
string_t< char_T > &  str 
)
friend

在文件 all_defs.cpp39601 行定义.

39601 {
39602 str.clear();
39603 using namespace char_set;
39604 while(isspace(is.peek()))
39605 is.get();
39606 /*/
39607 size_t insert_pos=0;
39608 while(!is.is_end()){
39609 const auto c=is.peek();
39610 switch (c){
39611 case char_T(38)://right
39612 is.get();
39613 if(insert_pos<str.size())
39614 insert_pos++;
39615 break;
39616 case char_T(37)://left
39617 is.get();
39618 if(insert_pos>0)
39619 insert_pos--;
39620 break;
39621 case char_T(8)://backspace
39622 is.get();
39623 if(insert_pos>0)
39624 str.erase(--insert_pos);
39625 break;
39626
39627 default:
39628 if(isspace(c))
39629 return is;
39630 else
39631 str.insert(insert_pos++,is.get());
39632 break;
39633 }
39634 }
39635 /*/
39636 while(!is.is_end()&&!isspace(is.peek()))
39637 str+=is.get();
39638 //*/
39639 return is;
39640 }

类成员变量说明

◆ find_nothrow

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::find_nothrow =equal.nothrow<char_T>
staticconstexpr

在文件 all_defs.cpp39206 行定义.

◆ floating_arec_able

template<typename char_T >
constexpr bool elc::defs::string_n::string_t< char_T >::floating_arec_able =floating_arec_result_able||floating_arec_set_able
staticconstexpr

在文件 all_defs.cpp38956 行定义.

◆ npos

template<typename char_T >
constexpr size_t elc::defs::string_n::string_t< char_T >::npos = bit::npos
staticconstexpr

在文件 all_defs.cpp38602 行定义.


该结构体的文档由以下文件生成: