flags.hpp
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cudf/utilities/export.hpp>
8 
9 #include <cstdint>
10 
11 namespace CUDF_EXPORT cudf {
12 namespace strings {
13 
26 enum regex_flags : uint32_t {
27  DEFAULT = 0,
28  MULTILINE = 8,
29  DOTALL = 16,
30  ASCII = 256,
31  EXT_NEWLINE = 512
32 };
33 
40 constexpr bool is_multiline(regex_flags const f)
41 {
43 }
44 
51 constexpr bool is_dotall(regex_flags const f)
52 {
54 }
55 
62 constexpr bool is_ascii(regex_flags const f)
63 {
64  return (f & regex_flags::ASCII) == regex_flags::ASCII;
65 }
66 
73 constexpr bool is_ext_newline(regex_flags const f)
74 {
76 }
77 
85 enum class capture_groups : uint32_t {
86  EXTRACT,
88 };
89  // end of doxygen group
91 } // namespace strings
92 } // namespace CUDF_EXPORT cudf
capture_groups
Capture groups setting.
Definition: flags.hpp:85
regex_flags
Regex flags.
Definition: flags.hpp:26
constexpr bool is_ext_newline(regex_flags const f)
Returns true if the given flags contain EXT_NEWLINE.
Definition: flags.hpp:73
constexpr bool is_dotall(regex_flags const f)
Returns true if the given flags contain DOTALL.
Definition: flags.hpp:51
constexpr bool is_multiline(regex_flags const f)
Returns true if the given flags contain MULTILINE.
Definition: flags.hpp:40
constexpr bool is_ascii(regex_flags const f)
Returns true if the given flags contain ASCII.
Definition: flags.hpp:62
@ EXTRACT
Capture groups processed normally for extract.
@ NON_CAPTURE
Convert all capture groups to non-capture groups.
@ DOTALL
the '.' matching includes new-line characters
Definition: flags.hpp:29
@ DEFAULT
default
Definition: flags.hpp:27
@ ASCII
use only ASCII when matching built-in character classes
Definition: flags.hpp:30
@ MULTILINE
the '^' and '$' honor new-line characters
Definition: flags.hpp:28
@ EXT_NEWLINE
new-line matches extended characters
Definition: flags.hpp:31
cuDF interfaces
Definition: host_udf.hpp:26