flags.hpp
1 /*
2  * 版权所有 (c) 2021-2024, NVIDIA CORPORATION.
3  *
4  * 根据 Apache 许可证版本 2.0(“许可证”)获得许可;
5  * 除非符合许可证的规定,否则不得使用此文件。
6  * 您可以通过以下方式获取许可证副本:
7  *
8  * https://apache.ac.cn/licenses/LICENSE-2.0
9  *
10  * 除非适用法律要求或书面同意,软件
11  * 根据许可证分发,基于“原样”基础,
12  * 不附带任何明示或暗示的保证或条件。
13  * 有关管理权限和限制的特定语言,请参阅许可证。
14  * 许可证下的限制。
15  */
16 #pragma once
17 
18 #include <cudf/utilities/export.hpp>
19 
20 #include <cstdint>
21 
22 namespace CUDF_EXPORT cudf {
23 namespace strings {
24 
37 enum regex_flags : uint32_t {
38  DEFAULT = 0,
39  MULTILINE = 8,
40  DOTALL = 16,
41  ASCII = 256,
42  EXT_NEWLINE = 512
43 };
44 
51 constexpr bool is_multiline(regex_flags const f)
52 {
54 }
55 
62 constexpr bool is_dotall(regex_flags const f)
63 {
65 }
66 
73 constexpr bool is_ascii(regex_flags const f)
74 {
75  return (f & regex_flags::ASCII) == regex_flags::ASCII;
76 }
77 
84 constexpr bool is_ext_newline(regex_flags const f)
85 {
87 }
88 
96 enum class capture_groups : uint32_t {
97  EXTRACT,
99 };
100  // end of doxygen group
102 } // namespace strings
103 } // namespace CUDF_EXPORT cudf
capture_groups
捕获组设置。
定义: flags.hpp:96
regex_flags
正则表达式标志。
定义: flags.hpp:37
constexpr bool is_ext_newline(regex_flags const f)
如果给定标志包含 EXT_NEWLINE,则返回 true。
定义: flags.hpp:84
constexpr bool is_dotall(regex_flags const f)
如果给定标志包含 DOTALL,则返回 true。
定义: flags.hpp:62
constexpr bool is_multiline(regex_flags const f)
如果给定标志包含 MULTILINE,则返回 true。
定义: flags.hpp:51
constexpr bool is_ascii(regex_flags const f)
如果给定标志包含 ASCII,则返回 true。
定义: flags.hpp:73
@ EXTRACT
捕获组通常用于提取。
@ NON_CAPTURE
将所有捕获组转换为非捕获组。
@ DOTALL
'.' 匹配包括换行符
定义: flags.hpp:40
@ DEFAULT
默认
定义: flags.hpp:38
@ ASCII
匹配内置字符类时仅使用 ASCII
定义: flags.hpp:41
@ MULTILINE
'^' 和 '$' 遵循换行符
定义: flags.hpp:39
@ EXT_NEWLINE
换行符匹配扩展字符
定义: flags.hpp:42
cuDF 接口
定义: host_udf.hpp:37