📄 wystr.3wy
字号:
this member ensures a char(0) is present(written) at the end of data (not counted by member size()). Note: Non-const members may cause reallocation. Reallocation invalidates dereference of the returned pointer. Note: The pointed object is meant to return, which is a dynamically allocated character array. Note: Equivalent objects do not mean data address and capacity are equal..PP [\fBRet\fP] const object pointer of the data ,or points to char(0) if object is default.\"--------------------------------------------.PP.BI "const char* begin(void) const throw()".PP Get const object pointer of data. Note: This member is the same as \fBdata\fP().PP [\fBRet\fP] pointer of the data.\"--------------------------------------------.PP.BI "const char* end(void) const throw()".PP Get the one-past-the-last pointer of the data Note: Deference of the returned pointer is never valid..PP [\fBRet\fP] one-past-the-last pointer of the data.\"--------------------------------------------.PP.BI "const WyStr& operator =(const WyStr& " "str" ") throw(Reply)".PP Assign object to the state as WyStr(\fIstr\fP).PP [\fBThrow\fP] Reply Wym_ELOOP *this and \fIstr\fP would overlap Wym_ENOMEM Not enough memory.PP [\fBRet\fP] const reference of *this.\"--------------------------------------------.PP.BI "const WyStr& operator =(const WyCSeg& " "cs" ") throw(Reply)".PP Assign object to the state as WyStr(\fIcs\fP).PP [\fBThrow\fP] Reply Wym_ELOOP *this and \fIcs\fP would overlap Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory Note: Construction of \fIcs\fP may throw WyCSeg::Reply.PP [\fBRet\fP] const reference of *this.\"--------------------------------------------.PP.BI "void swap(WyStr& " "str" ") throw()".PP Interchange data of *this with that of \fIstr\fP Note: Previously output data pointer/reference are invalidated.\"--------------------------------------------.PP.BI "WyRet append(char " "ch" ") throw()".PP Append character \fIch\fP to the data.PP [\fBRet\fP] Ok Succeed Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet append(const WyStr& " "str" ") throw()".PP Append \fIstr\fP to the data.PP [\fBRet\fP] Ok Succeed Wym_EFBIG Data size exceeds the maximum Wym_ELOOP *this and \fIstr\fP would overlap Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet append(const WyCSeg& " "cs" ") throw()".PP Append characters pointed by \fIcs\fP to *this.PP [\fBRet\fP] Ok Succeed Wym_EFBIG Data size exceeds the maximum Wym_ELOOP *this and \fIcs\fP would overlap Wym_ENOMEM Not enough memory Note: Construction of \fIcs\fP may throw WyCSeg::Reply.\"--------------------------------------------.PP.BI "WyRet append(size_t " "cnum" ", char " "ch" ") throw()".PP Append \fIcnum\fP of character \fIch\fP's to the data.PP [\fBRet\fP] Ok Succeed Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "const WyStr& operator +=(char " "ch" ") throw(Reply)".PP Append character \fIch\fP to the data.PP [\fBThrow\fP] Reply Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.PP [\fBRet\fP] const reference of *this.\"--------------------------------------------.PP.BI "const WyStr& operator +=(const WyStr& " "str" ") throw(Reply)".PP Append \fIstr\fP to the data.PP [\fBThrow\fP] Reply Wym_EFBIG Data size exceeds the maximum Wym_ELOOP *this and \fIstr\fP would overlap Wym_ENOMEM Not enough memory.PP [\fBRet\fP] const reference of *this.\"--------------------------------------------.PP.BI "const WyStr& operator +=(const WyCSeg& " "cs" ") throw(Reply)".PP Append characters pointed by \fIcs\fP to *this.PP [\fBThrow\fP] Reply Wym_EFBIG Data size exceeds the maximum Wym_ELOOP *this and \fIcs\fP would overlap Wym_ENOMEM Not enough memory Note: Construction of \fIcs\fP may throw WyCSeg::Reply.PP [\fBRet\fP] const reference of *this.\"--------------------------------------------.PP.BI "WyRet insert(size_t " "idx" ", const WyStr& " "str" ") throw()".PP Insert \fIstr\fP to *this at position \fIidx\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size() Wym_ELOOP *this and \fIstr\fP would overlap Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet insert(size_t " "idx" ", const WyCSeg& " "cs" ") throw()".PP Insert the characters pointed by \fIcs\fP to *this at position \fIidx\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size() Wym_ELOOP *this and \fIcs\fP would overlap Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet insert(size_t " "idx" ", size_t " "cnum" ", char " "ch" ") throw()".PP Insert \fIcnum\fP characters \fIch\fP's to *this at position \fIidx\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size() Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet erase(size_t " "idx" ") throw()".PP Erase characters from \fIidx\fP to the last of *this.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size().\"--------------------------------------------.PP.BI "WyRet erase(size_t " "idx" ", size_t " "len" ") throw()".PP Erase at most \fIlen\fP characters starting from \fIidx\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size().\"--------------------------------------------.PP.BI "WyRet resize(size_t " "num" ") throw()".PP Resize data to \fInum\fP characters. If \fInum\fP is greater than the current size, char(0) pads the lengthened characters, otherwise data truncated..PP [\fBRet\fP] Ok Succeed Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet resize(size_t " "num" ", char " "ch" ") throw()".PP Resize data to \fInum\fP characters. If \fInum\fP is greater than the current size, \fIch\fP pads the lengthened characters, otherwise data truncated..PP [\fBRet\fP] Ok Succeed Wym_EFBIG Data size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet replace(size_t " "idx" ", size_t " "num" ", const WyStr& " "str" ") throw()".PP Replace at most \fInum\fP characters from \fIidx\fP of *this with \fIstr\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size() Wym_ELOOP *this and \fIstr\fP would overlap Wym_EFBIG Size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet replace(size_t " "idx" ", size_t " "num" ", const WyCSeg& " "cs" ") throw()".PP Replace at most \fInum\fP characters from \fIidx\fP of *this ,with the characters pointed by \fIcs\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size() Wym_ELOOP *this and \fIcs\fP would overlap Wym_EFBIG Size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet replace(size_t " "idx" ", size_t " "num" ", size_t " "cnum" ",char " "ch" ") throw()".PP Replace at most \fInum\fP characters from \fIidx\fP of *this ,with \fIcnum\fP characters \fIch\fP.PP [\fBRet\fP] Ok Succeed Wym_EINVAL \fIidx\fP > this->size() Wym_EFBIG Size exceeds the maximum Wym_ENOMEM Not enough memory.\"--------------------------------------------.PP.BI "WyRet copyto(size_t* " "rlen" ", char* " "buf" ", size_t " "blen" ", size_t " "idx" ") const throw()".PP Copy characters of *this from \fIidx\fP into \fIbuf\fP. The number of characters copied and stored into *\fIrlen\fP(if not NULL) is the minimum of \fIblen\fP and this->size()-\fIidx\fP. Warning: This member is obsolete and might be removed..PP [\fBRet\fP] Ok *\fIrlen\fP stored with the bytes copied Wym_EFAULT \fIbuf\fP pointed to inaccessible address Wym_ELOOP *this and \fIbuf\fP would overlap Wym_EINVAL \fIidx\fP > this->size().\"--------------------------------------------.PP.BI "bool find(size_t* " "res" ", char " "ch" ") const throw()".PP Find the minimal position of occurrence \fIch\fP in data ,reset *\fIres\fP with the position found if \fIres\fP is not NULL..PP [\fBRet\fP] true = found, *\fIres\fP contains the position found false= otherwise, *\fIres\fP intact..\"--------------------------------------------.PP.BI "bool find(size_t* " "res" ", const WyCSeg " "cs" ") const throw()".PP Find the minimal position of occurrence of the sub-string pointed by \fIcs\fP, and reset *\fIres\fP with the position found if \fIres\fP is not NULL..PP [\fBRet\fP] true = found, *\fIres\fP contains the position found false= otherwise, *\fIres\fP intact..\"--------------------------------------------.PP.BI "bool find(size_t* " "res" ", size_t " "idx" ", char " "ch" ") const throw()".PP Find the minimal position of occurrence \fIch\fP in the range from \fIidx\fP to size(), reset *\fIres\fP with the position found if \fIres\fP is not NULL..PP [\fBRet\fP] true = found, *\fIres\fP contains the position found false= otherwise, *\fIres\fP intact..\"--------------------------------------------.PP.BI "bool find(size_t* " "res" ", size_t " "idx" ", const WyCSeg " "cs" ") const throw()".PP Find the minimal position of occurrence of the sub-string pointed by \fIcs\fP in the range from \fIidx\fP to size(), reset *\fIres\fP with the position found if \fIres\fP is not NULL..PP [\fBRet\fP] true = found, *\fIres\fP contains the position found false= otherwise, *\fIres\fP intact..\"--------------------------------------------.PP.BI "bool rfind(size_t* " "res" ", char " "ch" ") const throw()".PP Find the maximum position of occurrence \fIch\fP in data ,reset *\fIres\fP with the position found if \fIres\fP is not NULL..PP [\fBRet\fP] true = found, *\fIres\fP contains the position found false= otherwise, *\fIres\fP intact..\"--------------------------------------------.PP.BI "bool rfind(size_t* " "res" ", const WyCSeg& " "cs" ") const throw()"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -