⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wy__hstr.h

📁 一个不错
💻 H
📖 第 1 页 / 共 2 页
字号:
    // [Syn] Set object to contain num characters of ch    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //                WyRet set_string(size_type cnum,value_type ch) WY__TSPC();    // [Syn] Append hstr string    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //       Wym_ELOOP    *this and argument indicated string would overlap    //    WyRet append(const Wy__HStr& hstr) WY__TSPC();    // [Syn] Append string indicated by cs    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //       Wym_ELOOP    *this and argument indicated string would overlap    //    WyRet append(const WyCSeg& cs) WY__TSPC();    // [Syn] Append num of character ch    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet append(size_type cnum,value_type ch) WY__TSPC();    // [Syn] Append character ch    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet append(value_type ch) WY__TSPC();    // [Syn] Find the minimum index of the occurrence of ch in data    //       Store the index of occurrence to res    //    // [Ret] true= found    //      false= otherwise    //    bool find(size_type* res,value_type ch) const WY__TSPC();    // [Syn] Find the maximum index of the occurrence of ch in data    //       Store the index of occurrence to res    //    // [Ret] true= found    //      false= otherwise    //    bool rfind(size_type* res,value_type ch) const WY__TSPC();    bool rfind(size_type* res,const WyCSeg& cs) const WY__TSPC();    // [Syn] Find the minimum index of the occurrence of ch in the range    //       from idx to size()    //       Store the index of occurrence to res    //    // [Ret] true= found    //      false= otherwise    //    bool find(size_type* res,size_type idx,value_type ch) const WY__TSPC();    // [Syn] Find the maximum index of the occurrence of ch in the range    //       from 0 to idx    //       Store the index of occurrence to res    //    // [Ret] true= found    //      false= otherwise    //    bool rfind(size_type* res,size_type idx,value_type ch) const WY__TSPC();    // [Syn] Find the minimum index of the occurrence of ch in the range    //       from idx to size()    //       Store the index of occurrence to res    //    // [Ret] true= found    //      false= otherwise    //    bool find(size_type* res,size_type idx,const WyCSeg& cs) const WY__TSPC();    // [Syn] Find the maximum index of the occurrence of characters    //       indicated by cs in the range from 0 to idx    //       Store the index of occurrence to res    //    // [Ret] true= found    //      false= otherwise    //    bool rfind(size_type* res,size_type idx,const WyCSeg& cs) const WY__TSPC();    bool _find_not(size_type* res,size_type idx,value_type ch) const WY__TSPC();    bool _find_not(size_type* res,size_type idx,const WyCSeg& cs) const WY__TSPC();    bool _rfind_not(size_type* res,size_type idx,value_type ch) const WY__TSPC();    bool _rfind_not(size_type* res,size_type idx,const WyCSeg& cs) const WY__TSPC();    bool _find_in(size_type* res,size_type idx,const WyCSeg& cs) const WY__TSPC();    bool _rfind_in(size_type* res,size_type idx,const WyCSeg& cs) const WY__TSPC();    // [Syn] Insert string indicated by cs to the data    //       at index idx     //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //       Wym_ELOOP    *this and argument indicated string would overlap    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet insert(size_type idx,const WyCSeg& cs) WY__TSPC();    // [Syn] Insert num characters ch to the data    //       at index idx     //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet insert(size_type idx,size_type num,value_type ch) WY__TSPC();    // [Syn] Insert str to the data    //       at index idx     //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //       Wym_ELOOP    *this and argument indicated string would overlap    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet insert(size_type idx,const Wy__HStr& str) WY__TSPC();    // [Syn] Erase from &(*this)[idx] to the last char of *this    //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //    WyRet erase(size_type idx) WY__NOTHROW__;    // [Syn] Erase at most len characters from &(*this)[idx]    //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //    WyRet erase(size_type idx,size_type len) WY__TSPC();    // [Syn] Change data size to num. If num>size(), char(0) is padded    //    // Note: Shrink (num<=_capacity()) should not cause error    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet resize(size_type num) WY__TSPC()         {           WY_RETURN( this->resize(num,value_type(0)) );         };    // [Syn] Change data size to num. If num>size(), char(0) is padded    //    // Note: Shrink (num<=_capacity()) should not cause error    //    // [Ret] Ok    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet resize(size_type num,value_type ch) WY__TSPC();    // [Syn] Replace at most num characters of *this from index idx    //       with str    //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //       Wym_ELOOP    *this and argument indicated string would overlap    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet replace(size_type idx,size_type num,const Wy__HStr& str) WY__TSPC()         {           WY_RETURN( this->replace(idx,num,str.cseg()) );         };    // [Syn] Replace at most num characters of *this from index idx    //       with characters indicated by cs    //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //       Wym_ELOOP    *this and argument indicated string would overlap    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet replace(size_type idx,size_type num,const WyCSeg& cs) WY__TSPC();    // [Syn] Replace at most num characters of *this from index idx    //       with cnum characters ch    //    // [Ret] Ok    //       Wym_EINVAL   idx>size()    //       Wym_EFBIG    Data size would exceed _capacity()    //    WyRet replace(size_type idx,size_type num,size_type cnum,value_type ch) WY__TSPC();    // [Syn] Compare string of *this with str    //    // [Ret]  >0 *this is greater    //       ==0 *this is equal    //        <0 *this is less    //    int _strcmp(const Wy__HStr& str) const WY__TSPC();    // [Syn] Compare string of *this from idx at most num characters    //       with cstr    //    // [Ret]  >0 *this is greater    //       ==0 *this is equal    //        <0 *this is less    //    int _strcmp(const WyCSeg& cs) const WY__TSPC();    // [Syn] Copy substring from &(*this)[idx] to buf    //       The number copied is the minimum of blen and size()-idx    //    //  Note: Not copy safe    //    // [Ret] Ok    //       Wym_EFAULT    //       Wym_ELOOP    *this and argument indicated string would overlap    //       Wym_EINVAL   idx>size()    //    WyRet copyto(size_type* rlen,value_type* buf,size_type blen,size_type idx) const WY__TSPC();    static const size_type min_capacity(void) WY__NOTHROW__;    static const size_type max_capacity(void) WY__NOTHROW__;    // [Internal] Set data size to nsize    //    // Note: App. should make sure nsize<_capacity()    //       This member differs with resize(..) in that this    //       member does not fill the lengthened data area    //    // [Ret] Ok    //       Wym_EFBIG    //    WyRet _setsize(size_t nsize) WY__NOTHROW__;  private:    class Wy__Assert_Check;    size_type _m_dcap;    size_type _m_dlen; //   const char _pad[ (sizeof(double)>2*sizeof(size_type))? //                     sizeof(double)-2*sizeof(size_type) : 0 ];};inline const Wy__HStr::size_type Wy__HStr::min_capacity(void) WY__NOTHROW__{ return DefaultObjSize-sizeof(value_type)-sizeof(Wy__HStr);};inline const Wy__HStr::size_type Wy__HStr::max_capacity(void) WY__NOTHROW__{ return Wy__MaxStrSize;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -