pub fn truncate_with_marker(s: &str, max_chars: usize, marker: &str) -> StringExpand description
s, or its first max_chars characters followed by marker when it is
longer. The result is max_chars plus the marker at most.
use gemini_adk_rs::utils::text::truncate_with_marker;
assert_eq!(truncate_with_marker("héllo wörld", 5, "…"), "héllo…");
assert_eq!(truncate_with_marker("héllo", 5, "…"), "héllo");