|
Console Library 8.0.0
A header-only library that makes C++ simple
|
匹配结果对象,保存文本副本和位置信息,不依赖迭代器有效性。 More...
#include <re.h>
Classes | |
| struct | GroupInfo |
Public Member Functions | |
| Match () | |
| 默认构造函数,创建一个空的匹配结果。 | |
| Match (string_type t, const match_type &m) | |
| 构造函数,从文本和匹配结果创建匹配对象。 | |
| string_type | group (int n=0) const |
| 获取指定组的子串。 | |
| std::vector< string_type > | groups () const |
| 获取所有组的子串。 | |
| int | start (int n=0) const |
| 获取指定组的起始位置。 | |
| int | end (int n=0) const |
| 获取指定组的结束位置。 | |
| std::pair< int, int > | span (int n=0) const |
| 获取指定组的起始和结束位置。 | |
| operator bool () const | |
| 显式转换为 bool 类型。 | |
Private Attributes | |
| string_type | text_copy |
| 文本副本。 | |
| std::vector< GroupInfo > | groups_ |
| 组信息列表。 | |
| bool | success |
| 匹配成功标志。 | |
匹配结果对象,保存文本副本和位置信息,不依赖迭代器有效性。
|
inline |
默认构造函数,创建一个空的匹配结果。
|
inline |
构造函数,从文本和匹配结果创建匹配对象。
| t | 文本副本。 |
| m | 匹配结果。 |
|
inline |
获取指定组的结束位置。
| n | 组的索引,默认为 0。 |
|
inline |
获取指定组的子串。
| n | 组的索引,默认为 0。 |
|
inline |
获取所有组的子串。
|
inlineexplicit |
显式转换为 bool 类型。
|
inline |
获取指定组的起始和结束位置。
| n | 组的索引,默认为 0。 |
|
inline |
获取指定组的起始位置。
| n | 组的索引,默认为 0。 |
|
private |
组信息列表。
|
private |
匹配成功标志。
|
private |
文本副本。