公有成员函数 | 静态公有成员函数 | 友元 | 所有成员列表
cudf::strings::regex_program 结构体参考

正则表达式程序类。 更多...

#include <regex__program.hpp>

公有成员函数

 regex_program (regex_program &&other)
 移动构造函数。 更多...
 
regex_programoperator= (regex_program &&other)
 移动赋值运算符。 更多...
 
std::string pattern () const
 返回用于创建此实例的模式。 更多...
 
regex_flags flags () const
 返回用于创建此实例的 regex_flags。 更多...
 
capture_groups capture () const
 返回用于创建此实例的 capture_groups。 更多...
 
int32_t instructions_count () const
 返回此实例中的指令数量。 更多...
 
int32_t groups_count () const
 返回此实例中的捕获组数量。 更多...
 
std::size_t compute_working_memory_size (int32_t num_strings) const
 返回正则表达式执行所需工作内存的大小。 更多...
 

静态公有成员函数

static std::unique_ptr< regex_programcreate (std::string_view pattern, regex_flags flags=regex_flags::DEFAULT, capture_groups capture=capture_groups::EXTRACT)
 从模式创建程序。 更多...
 

友元

struct regex_device_builder
 

详细描述

正则表达式程序类。

从正则表达式模式创建一个实例,并使用它调用相应的字符串 API。一个实例可以被重用。

有关支持正则表达式的模式和 API 的详细信息,请参阅 Regex Features 页面。

定义在文件 regex_program.hpp40 行。

构造函数和析构函数文档

◆ regex_program()

cudf::strings::regex_program::regex_program ( regex_program &&  other)

移动构造函数。

参数
other要从中移动的对象

成员函数文档

◆ capture()

capture_groups cudf::strings::regex_program::capture ( ) const

返回用于创建此实例的 capture_groups。

返回
捕获组设置

◆ compute_working_memory_size()

std::size_t cudf::strings::regex_program::compute_working_memory_size ( int32_t  num_strings) const

返回正则表达式执行所需工作内存的大小。

参数
num_strings用于计算的字符串数量
返回
工作内存的大小(字节)

◆ create()

static std::unique_ptr<regex_program> cudf::strings::regex_program::create ( std::string_view  pattern,
regex_flags  flags = regex_flags::DEFAULT,
capture_groups  capture = capture_groups::EXTRACT 
)
static

从模式创建程序。

异常
cudf::logic_error如果模式无效或包含不支持的特性
参数
pattern正则表达式模式
flags用于解释模式中特殊字符的正则表达式标志
capture控制模式中捕获组的使用方式
返回
此对象的实例

◆ flags()

regex_flags cudf::strings::regex_program::flags ( ) const

返回用于创建此实例的 regex_flags。

返回
正则表达式标志设置

◆ groups_count()

int32_t cudf::strings::regex_program::groups_count ( ) const

返回此实例中的捕获组数量。

返回
组数量

◆ instructions_count()

int32_t cudf::strings::regex_program::instructions_count ( ) const

返回此实例中的指令数量。

返回
指令数量

◆ operator=()

regex_program& cudf::strings::regex_program::operator= ( regex_program &&  other)

移动赋值运算符。

参数
other要从中移动的对象
返回
此对象

◆ pattern()

std::string cudf::strings::regex_program::pattern ( ) const

返回用于创建此实例的模式。

返回
作为字符串的正则表达式模式

此结构体的文档生成自以下文件