padding.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 <cudf/column/column.hpp>
8 #include <cudf/scalar/scalar.hpp>
12 
18 namespace CUDF_EXPORT cudf {
19 namespace strings {
50 std::unique_ptr<column> pad(
51  strings_column_view const& input,
52  size_type width,
53  side_type side = side_type::RIGHT,
54  std::string_view fill_char = " ",
57 
82 std::unique_ptr<column> zfill(
83  strings_column_view const& input,
84  size_type width,
87 
116 std::unique_ptr<column> zfill_by_widths(
117  strings_column_view const& input,
118  column_view const& widths,
121  // end of doxygen group
123 } // namespace strings
124 } // namespace CUDF_EXPORT cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
Class definition for cudf::column.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
side_type
Direction identifier for cudf::strings::strip and cudf::strings::pad functions.
Definition: side_type.hpp:24
std::unique_ptr< column > zfill(strings_column_view const &input, size_type width, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Add '0' as padding to the left of each string.
std::unique_ptr< column > zfill_by_widths(strings_column_view const &input, column_view const &widths, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Add '0' as padding to the left of each string.
std::unique_ptr< column > pad(strings_column_view const &input, size_type width, side_type side=side_type::RIGHT, std::string_view fill_char=" ", rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Add padding to each string using a provided character.
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:84
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:26
Class definitions for cudf::scalar.
Enum defining the side of a string to apply strip or pad operations.
Class definition for cudf::strings_column_view.