NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
neforce::regex_iterator类 参考

正则表达式匹配迭代器 更多...

#include <regex.hpp>

Public 类型

using iterator_category = forward_iterator_tag
 迭代器类型
using value_type = match_result
 元素类型
using difference_type = ptrdiff_t
 差值类型
using pointer = const match_result*
 指针类型
using reference = const match_result&
 引用类型

Public 成员函数

 regex_iterator ()=default
 默认构造函数,构造结束迭代器
 regex_iterator (const regex *re, string str, size_t pos=0)
 构造函数
reference operator* () const noexcept
 解引用操作符
pointer operator-> () const noexcept
 成员访问操作符
regex_iteratoroperator++ ()
 前置递增操作符
regex_iterator operator++ (int)
 后置递增操作符
bool operator== (const regex_iterator &other) const noexcept
 相等比较操作符
bool operator!= (const regex_iterator &other) const noexcept
 不等比较操作符

静态 Public 成员函数

static regex_iterator begin (const regex *re, const string &str)
 获取起始迭代器
static regex_iterator end (const regex *re, const string &str)
 获取结束迭代器

详细描述

正则表达式匹配迭代器

前向迭代器,惰性遍历字符串中的匹配结果。

在文件 regex.hpp341 行定义.

构造及析构函数说明

◆ regex_iterator()

neforce::regex_iterator::regex_iterator ( const regex * re,
string str,
size_t pos = 0 )

构造函数

参数
re正则表达式对象
str待遍历的字符串
pos起始位置

成员函数说明

◆ begin()

regex_iterator neforce::regex_iterator::begin ( const regex * re,
const string & str )
inlinestatic

获取起始迭代器

参数
re正则表达式对象
str待遍历的字符串
返回
起始迭代器

在文件 regex.hpp421 行定义.

引用了 regex_iterator().

◆ end()

regex_iterator neforce::regex_iterator::end ( const regex * re,
const string & str )
inlinestatic

获取结束迭代器

参数
re正则表达式对象
str待遍历的字符串
返回
结束迭代器

在文件 regex.hpp429 行定义.

引用了 regex_iterator().

◆ operator!=()

bool neforce::regex_iterator::operator!= ( const regex_iterator & other) const
inlinenodiscardnoexcept

不等比较操作符

参数
other另一个迭代器
返回
不等返回true

在文件 regex.hpp413 行定义.

引用了 regex_iterator().

◆ operator*()

reference neforce::regex_iterator::operator* ( ) const
inlinenodiscardnoexcept

解引用操作符

返回
当前匹配结果

在文件 regex.hpp377 行定义.

◆ operator++() [1/2]

regex_iterator & neforce::regex_iterator::operator++ ( )

前置递增操作符

返回
递增后的迭代器

引用了 regex_iterator().

◆ operator++() [2/2]

regex_iterator neforce::regex_iterator::operator++ ( int )
inline

后置递增操作符

返回
递增前的迭代器

在文件 regex.hpp395 行定义.

引用了 regex_iterator().

◆ operator->()

pointer neforce::regex_iterator::operator-> ( ) const
inlinenodiscardnoexcept

成员访问操作符

返回
当前匹配结果指针

在文件 regex.hpp383 行定义.

◆ operator==()

bool neforce::regex_iterator::operator== ( const regex_iterator & other) const
nodiscardnoexcept

相等比较操作符

参数
other另一个迭代器
返回
相等返回true

引用了 regex_iterator().


该类的文档由以下文件生成: