Skip to main content

seq_runtime/
string_ops.rs

1//! String operations for Seq
2//!
3//! All FFI entry points below are exported with C ABI for LLVM codegen to
4//! call. They are grouped into per-concern sub-modules and re-exported
5//! from here so the flat public surface (`string_ops::patch_seq_*`) is
6//! unchanged.
7//!
8//! # Design Decision: split Return Value
9//!
10//! `split` uses Option A (push parts + count):
11//! - "a b c" " " split → "a" "b" "c" 3
12//!
13//! This is the simplest approach, requiring no new types.
14//! The count allows the caller to know how many parts were pushed.
15
16mod access;
17mod basic;
18mod case;
19mod conversion;
20mod cstring;
21
22#[cfg(test)]
23mod tests;
24
25pub use access::*;
26pub use basic::*;
27pub use case::*;
28pub use conversion::*;
29pub use cstring::*;
30
31// Public re-exports with short names for internal use
32pub use patch_seq_char_to_string as char_to_string;
33pub use patch_seq_json_escape as json_escape;
34pub use patch_seq_string_byte_length as string_byte_length;
35pub use patch_seq_string_char_at as string_char_at;
36pub use patch_seq_string_chomp as string_chomp;
37pub use patch_seq_string_concat as string_concat;
38pub use patch_seq_string_contains as string_contains;
39pub use patch_seq_string_empty as string_empty;
40pub use patch_seq_string_equal as string_equal;
41pub use patch_seq_string_find as string_find;
42pub use patch_seq_string_length as string_length;
43pub use patch_seq_string_split as string_split;
44pub use patch_seq_string_starts_with as string_starts_with;
45pub use patch_seq_string_substring as string_substring;
46pub use patch_seq_string_to_int as string_to_int;
47pub use patch_seq_string_to_lower as string_to_lower;
48pub use patch_seq_string_to_upper as string_to_upper;
49pub use patch_seq_string_trim as string_trim;