char_types_enum.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2024, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cstdint>
8 #include <type_traits>
9 
10 namespace CUDF_EXPORT cudf {
11 namespace strings {
27 enum string_character_types : uint32_t {
28  DECIMAL = 1 << 0,
29  NUMERIC = 1 << 1,
30  DIGIT = 1 << 2,
31  ALPHA = 1 << 3,
32  SPACE = 1 << 4,
33  UPPER = 1 << 5,
34  LOWER = 1 << 6,
38 };
39 
48 {
49  return static_cast<string_character_types>(
50  static_cast<std::underlying_type_t<string_character_types>>(lhs) |
51  static_cast<std::underlying_type_t<string_character_types>>(rhs));
52 }
53 
63 {
64  lhs = static_cast<string_character_types>(
65  static_cast<std::underlying_type_t<string_character_types>>(lhs) |
66  static_cast<std::underlying_type_t<string_character_types>>(rhs));
67  return lhs;
68 }
69  // end of doxygen group
71 } // namespace strings
72 } // 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