padding.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
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 
13 namespace CUDF_EXPORT cudf {
14 namespace strings {
46 std::unique_ptr<column> pad(
47  strings_column_view const& input,
48  size_type width,
49  side_type side = side_type::RIGHT,
50  std::string_view fill_char = " ",
53 
78 std::unique_ptr<column> zfill(
79  strings_column_view const& input,
80  size_type width,
83 
112 std::unique_ptr<column> zfill_by_widths(
113  strings_column_view const& input,
114  column_view const& widths,
117  // end of doxygen group
119 } // namespace strings
120 } // 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.
detail::cccl_async_resource_ref< 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:20
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
cuDF interfaces
Definition: host_udf.hpp:26
Class definitions for cudf::scalar.
Class definition for cudf::strings_column_view.