作者在 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.
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.