1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Bridge definitions for libcudf string split operations.
#[cxx::bridge(namespace = "cudf_shims")]
pub mod ffi {
unsafe extern "C++" {
include!("strings/split_shim.h");
include!("column_shim.h");
include!("table_shim.h");
type OwnedColumn = crate::column::ffi::OwnedColumn;
type OwnedTable = crate::table::ffi::OwnedTable;
/// Split each string by the delimiter, returning a table of string columns.
/// Each row produces one element per resulting column.
fn str_split(
col: &OwnedColumn,
delimiter: &str,
maxsplit: i32,
) -> Result<UniquePtr<OwnedTable>>;
/// Split each string by the delimiter from the right.
fn str_rsplit(
col: &OwnedColumn,
delimiter: &str,
maxsplit: i32,
) -> Result<UniquePtr<OwnedTable>>;
/// Split each string, returning a list column of strings per row.
fn str_split_record(
col: &OwnedColumn,
delimiter: &str,
maxsplit: i32,
) -> Result<UniquePtr<OwnedColumn>>;
/// Split each string from the right, returning a list column.
fn str_rsplit_record(
col: &OwnedColumn,
delimiter: &str,
maxsplit: i32,
) -> Result<UniquePtr<OwnedColumn>>;
/// Return a single part from splitting each string by delimiter.
fn str_split_part(
col: &OwnedColumn,
delimiter: &str,
index: i32,
) -> Result<UniquePtr<OwnedColumn>>;
}
}