flags.hpp
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2026, 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  IGNORECASE = 2,
29  MULTILINE = 8,
30  DOTALL = 16,
31  ASCII = 256,
32  EXT_NEWLINE = 512
33 };
34 
41 constexpr bool is_ignorecase(regex_flags const f)
42 {
44 }
45 
52 constexpr bool is_multiline(regex_flags const f)
53 {
55 }
56 
63 constexpr bool is_dotall(regex_flags const f)
64 {
66 }
67 
74 constexpr bool is_ascii(regex_flags const f)
75 {
76  return (f & regex_flags::ASCII) == regex_flags::ASCII;
77 }
78 
85 constexpr bool is_ext_newline(regex_flags const f)
86 {
88 }
89 
97 enum class capture_groups : uint32_t {
98  EXTRACT,
100 };
101  // end of doxygen group
103 } // namespace strings
104 } // namespace CUDF_EXPORT cudf
constexpr bool is_ignorecase(regex_flags const f)
Returns true if the given flags contain IGNORECASE.
Definition: flags.hpp:41
capture_groups
Capture groups setting.
Definition: flags.hpp:97
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:85
constexpr bool is_dotall(regex_flags const f)
Returns true if the given flags contain DOTALL.
Definition: flags.hpp:63
constexpr bool is_multiline(regex_flags const f)
Returns true if the given flags contain MULTILINE.
Definition: flags.hpp:52
constexpr bool is_ascii(regex_flags const f)
Returns true if the given flags contain ASCII.
Definition: flags.hpp:74
@ 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:30
@ DEFAULT
default
Definition: flags.hpp:27
@ ASCII
use only ASCII when matching built-in character classes
Definition: flags.hpp:31
@ MULTILINE
the '^' and '$' honor new-line characters
Definition: flags.hpp:29
@ EXT_NEWLINE
new-line matches extended characters
Definition: flags.hpp:32
@ IGNORECASE
ignore case on matching all literal characters
Definition: flags.hpp:28
cuDF interfaces
Definition: host_udf.hpp:26