正则表达式程序类。 更多...
#include <regex__program.hpp>
公有成员函数 | |
regex_program (regex_program &&other) | |
移动构造函数。 更多... | |
regex_program & | operator= (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_program > | create (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.hpp 的 40 行。
cudf::strings::regex_program::regex_program | ( | regex_program && | other | ) |
移动构造函数。
other | 要从中移动的对象 |
capture_groups cudf::strings::regex_program::capture | ( | ) | const |
返回用于创建此实例的 capture_groups。
std::size_t cudf::strings::regex_program::compute_working_memory_size | ( | int32_t | num_strings | ) | const |
返回正则表达式执行所需工作内存的大小。
num_strings | 用于计算的字符串数量 |
|
static |
从模式创建程序。
cudf::logic_error | 如果模式无效或包含不支持的特性 |
pattern | 正则表达式模式 |
flags | 用于解释模式中特殊字符的正则表达式标志 |
capture | 控制模式中捕获组的使用方式 |
regex_flags cudf::strings::regex_program::flags | ( | ) | const |
返回用于创建此实例的 regex_flags。
int32_t cudf::strings::regex_program::groups_count | ( | ) | const |
返回此实例中的捕获组数量。
int32_t cudf::strings::regex_program::instructions_count | ( | ) | const |
返回此实例中的指令数量。
regex_program& cudf::strings::regex_program::operator= | ( | regex_program && | other | ) |
移动赋值运算符。
other | 要从中移动的对象 |
std::string cudf::strings::regex_program::pattern | ( | ) | const |
返回用于创建此实例的模式。