Object representing the match results of a capture range.
更多...
#include <regex.h>
|
| SubMatch (const std::string *str) |
| Creates a match for a single capture range given a non-owning pointer to the string. 更多...
|
|
size_t | position () const |
| Returns the position in the string at which the match starts. 更多...
|
|
size_t | length () const |
| Returns the length of the matching part. 更多...
|
|
std::string | str () const |
| Returns the matching part as a string 更多...
|
|
|
size_t | m_pos = std::string::npos |
|
size_t | m_len = std::string::npos |
|
const std::string * | m_str = nullptr |
|
Object representing the match results of a capture range.
在文件 regex.h 第 129 行定义.
◆ SubMatch()
reg::SubMatch::SubMatch |
( |
const std::string * |
str | ) |
|
|
inline |
Creates a match for a single capture range given a non-owning pointer to the string.
在文件 regex.h 第 133 行定义.
引用了 m_pos.
◆ length()
size_t reg::SubMatch::length |
( |
| ) |
const |
|
inline |
Returns the length of the matching part.
在文件 regex.h 第 139 行定义.
◆ position()
size_t reg::SubMatch::position |
( |
| ) |
const |
|
inline |
Returns the position in the string at which the match starts.
在文件 regex.h 第 136 行定义.
◆ setEnd()
void reg::SubMatch::setEnd |
( |
size_t |
pos | ) |
|
|
inlineprivate |
◆ setMatch()
void reg::SubMatch::setMatch |
( |
size_t |
pos, |
|
|
size_t |
len |
|
) |
| |
|
inlineprivate |
◆ setStart()
void reg::SubMatch::setStart |
( |
size_t |
pos | ) |
|
|
inlineprivate |
◆ str()
std::string reg::SubMatch::str |
( |
| ) |
const |
|
inline |
Returns the matching part as a string
在文件 regex.h 第 142 行定义.
◆ Match
◆ m_len
size_t reg::SubMatch::m_len = std::string::npos |
|
private |
◆ m_pos
size_t reg::SubMatch::m_pos = std::string::npos |
|
private |
◆ m_str
const std::string* reg::SubMatch::m_str = nullptr |
|
private |
该类的文档由以下文件生成: