ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::string_n 命名空间参考

命名空间

namespace  string_data_n
 

struct  base_string_data_t
 
struct  comn_string_data_t
 
struct  constexpr_string_data_t
 
struct  end_apply_string_data_t
 
struct  erased_string_data_t
 
struct  head_apply_string_data_t
 
struct  inserted_string_data_t
 
struct  null_string_data_t
 
struct  same_value_compress_string_data_t
 
struct  string_t
 
struct  substr_string_data_t
 
struct  sum_string_data_t
 

类型定义

typedef string_t< char_tstring
 

函数

template<constexpr_str_n::constexpr_str_t_literal_helper str_helper>
constexpr string operator""_elc_string () noexcept
 
template<typename char_T >
base_string_data_t< char_T > * the_get_null_ptr (const base_string_data_t< char_T > *) noexcept
 
template<class char_T >
 string_t (const char_T *) -> string_t< char_T >
 
template<class char_T >
 string_t (char_T *) -> string_t< char_T >
 
template<typename T >
void swap (string_t< T > &a, string_t< T > &b) noexcept
 
template<typename char_T , typename traits >
autooperator<< (::std::basic_ostream< char_T, traits > &os, const string_t< char_T > &str) noexcept
 
template<typename char_T , typename traits >
autooperator>> (::std::basic_istream< char_T, traits > &is, string_t< char_T > &str) noexcept
 
template<class T >
auto size_of_array_like (const string_t< remove_cv< T > > &a) noexcept
 
template<class T >
auto begin_of_array_like (string_t< remove_cv< T > > &a) noexcept
 
template<class T >
auto begin_of_array_like (const string_t< remove_cv< T > > &a) noexcept
 
template<constexpr_str_n::constexpr_str_t_literal_helper str_helper>
constexpr string operator""_string () noexcept
 
template<class char_T >
value arec_as_value (string_t< char_T > &str, const value index)
 

变量

template<typename char_T >
null_string_data_t< char_Tnull_string_data {}
 

类型定义说明

◆ string

函数说明

◆ arec_as_value()

template<class char_T >
value elc::defs::string_n::arec_as_value ( string_t< char_T > &  str,
const value  index 
)

在文件 all_defs.cpp42587 行定义.

42587 {
42588 size_t i=size_t(use_as<int_t>(index));
42589 if(!i)
42590 i=size_t(use_as<uint_t>(index));
42591 struct arec_data_t final:instance_struct<arec_data_t>
42592 ,value::base_data_t{
42594 arec_data_t(string_t<char_T>&str,size_t index)noexcept:_m(&str,index){};
42595 arec_data_t(const arec_data_t&ref)noexcept:_m(special_init,ref._m){}
42596 virtual ~arec_data_t()noexcept override final=default;
42597
42598 virtual void be_set(ptr a)noexcept override final{move(_m)=use_as<char_T>(a);}
42599 [[nodiscard]]virtual ptr get_value()noexcept override final{return core::make_binary_node_from<char_T>(move(_m));}
42600 [[nodiscard]]virtual base_data_t*copy()const noexcept override final{return get<arec_data_t>(*this);}
42601 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<arec_data_t>;}
42602 };
42603 return get<arec_data_t>(str,i);
42604 }
#define _m
constexpr struct elc::defs::memory::lifetime_n::copy_t copy
函数调用图:
这是这个函数的调用关系图:

◆ begin_of_array_like() [1/2]

template<class T >
auto elc::defs::string_n::begin_of_array_like ( const string_t< remove_cv< T > > &  a)
inlinenoexcept

在文件 all_defs.cpp39777 行定义.

39777{ return a.c_str(); }
const_string_ptr_t c_str() const noexcept

◆ begin_of_array_like() [2/2]

template<class T >
auto elc::defs::string_n::begin_of_array_like ( string_t< remove_cv< T > > &  a)
inlinenoexcept

在文件 all_defs.cpp39774 行定义.

39774{ return a.c_str(); }

◆ operator""_elc_string()

constexpr string elc::defs::string_n::operator""_elc_string ( )
inlineconstexprnoexcept

在文件 all_defs.cpp41144 行定义.

41144 {
41145 return operator""_string<str_helper>();
41146 }

◆ operator""_string()

constexpr string elc::defs::string_n::operator""_string ( )
inlineconstexprnoexcept

在文件 all_defs.cpp41140 行定义.

41140 {
41141 return string(constexpr_str_n::operator""_constexpr_str<str_helper>());
41142 }

◆ operator<<()

auto & elc::defs::string_n::operator<< ( ::std::basic_ostream< char_T, traits > &  os,
const string_t< char_T > &  str 
)
inlinenoexcept

在文件 all_defs.cpp39710 行定义.

39710 {
39711 typedef ::std::basic_ostream<char_T,traits> stream_t;
39712 typedef stream_t::traits_type traits_t;
39713 typename stream_t::iostate state = stream_t::goodbit;
39714
39715 size_t size = str.size();
39716 push_and_disable_msvc_warning(26494);//未初始化警告diss
39717 size_t pad;
39718 if(os.width() <= 0 || static_cast<size_t>(os.width()) <= size)
39719 pad = 0;
39720 else
39721 pad = static_cast<size_t>(os.width()) - size;
39723
39724 const typename stream_t::sentry isok(os);
39725
39726 if(!isok)
39727 state |= stream_t::badbit;
39728 else{
39729 try{
39730 if((os.flags() & stream_t::adjustfield) != stream_t::left){
39731 for(; 0 < pad; --pad){// pad on left
39732 if(traits_t::eq_int_type(traits_t::eof(), os.rdbuf()->sputc(os.fill()))){
39733 state |= stream_t::badbit;// insertion failed, quit
39734 break;
39735 }
39736 }
39737 }
39738 if(state == stream_t::goodbit){
39739 stream_n::std_ostream_wrap wrap(os);
39740 wrap<<str;
39741 }
39742 if(os.fail())
39743 state |= stream_t::badbit;
39744 else{
39745 for(; 0 < pad; --pad){// pad on right
39746 if(traits_t::eq_int_type(traits_t::eof(), os.rdbuf()->sputc(os.fill()))){
39747 state |= stream_t::badbit;// insertion failed, quit
39748 break;
39749 }
39750 }
39751 }
39752 os.width(0);
39753 }
39754 catch(...){
39755 os.setstate(stream_t::badbit, true);
39756 return os;
39757 }
39758 }
39759 os.setstate(state);
39760 return os;
39761 }
#define pop_msvc_warning()
Definition all_defs.cpp:478
#define push_and_disable_msvc_warning(...)
Definition all_defs.cpp:479
size_t size() const noexcept
函数调用图:

◆ operator>>()

auto & elc::defs::string_n::operator>> ( ::std::basic_istream< char_T, traits > &  is,
string_t< char_T > &  str 
)
inlinenoexcept

在文件 all_defs.cpp39763 行定义.

39763 {
39765 wrap>>str;
39766 return is;
39767 }
函数调用图:

◆ size_of_array_like()

template<class T >
auto elc::defs::string_n::size_of_array_like ( const string_t< remove_cv< T > > &  a)
inlinenoexcept

在文件 all_defs.cpp39771 行定义.

39771{ return a.size(); }

◆ string_t() [1/2]

◆ string_t() [2/2]

◆ swap()

template<typename T >
void elc::defs::string_n::swap ( string_t< T > &  a,
string_t< T > &  b 
)
inlinenoexcept

在文件 all_defs.cpp39706 行定义.

39706{ a.swap_with(b); }
void swap_with(this_t &a) noexcept
函数调用图: