char_types_enum.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cstdint>
8 #include <type_traits>
9 
15 namespace CUDF_EXPORT cudf {
16 namespace strings {
31 enum string_character_types : uint32_t {
32  DECIMAL = 1 << 0,
33  NUMERIC = 1 << 1,
34  DIGIT = 1 << 2,
35  ALPHA = 1 << 3,
36  SPACE = 1 << 4,
37  UPPER = 1 << 5,
38  LOWER = 1 << 6,
42 };
43 
52 {
53  return static_cast<string_character_types>(
54  static_cast<std::underlying_type_t<string_character_types>>(lhs) |
55  static_cast<std::underlying_type_t<string_character_types>>(rhs));
56 }
57 
67 {
68  lhs = static_cast<string_character_types>(
69  static_cast<std::underlying_type_t<string_character_types>>(lhs) |
70  static_cast<std::underlying_type_t<string_character_types>>(rhs));
71  return lhs;
72 }
73  // end of doxygen group
75 } // namespace strings
76 } // namespace CUDF_EXPORT cudf
constexpr string_character_types & operator|=(string_character_types &lhs, string_character_types rhs)
Compound assignment OR operator for combining string_character_types.
constexpr string_character_types operator|(string_character_types lhs, string_character_types rhs)
OR operator for combining string_character_types.
string_character_types
Character type values. These types can be or'd to check for any combination of types.
@ CASE_TYPES
all case-able characters
@ ALPHANUM
all alphanumeric characters
@ UPPER
all upper case characters
@ DIGIT
all digit characters
@ ALL_TYPES
all character types
@ DECIMAL
all decimal characters
@ SPACE
all space characters
@ NUMERIC
all numeric characters
@ LOWER
all lower case characters
@ ALPHA
all alphabetic characters
cuDF interfaces
Definition: host_udf.hpp:26