字符串属性 substr(截取字符串子串)

作者在 2008-09-20 16:44:50 发布以下内容
Copies a substring of at most some number of characters from a string beginning from a specified position.

 
basic_string substr(
   size_type _Off = 0,
   size_type _Count = npos // 晕死了,原来这里的_Count是个数
) const;

Parameters
_Off
An index locating the element at the position from which the copy of the string is made, with a default value of 0.

_Count
The number of characters that are to be copied if they are present.

Return Value
A substring object that is a copy of elements of the string operand beginning at the position specified by the first argument.

基础知识 | 阅读 6083 次
文章评论,共0条
游客请输入验证码
浏览1970315次