MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / truncate_column

Function truncate_column

atomic-cli/src/commands/session.rs:458–467  ·  view source on GitHub ↗
(value: &str, width: usize)

Source from the content-addressed store, hash-verified

456}
457
458fn truncate_column(value: &str, width: usize) -> String {
459 let count = value.chars().count();
460 if count <= width {
461 value.to_string()
462 } else if width <= 1 {
463 "…".to_string()
464 } else {
465 format!("{}…", value.chars().take(width - 1).collect::<String>())
466 }
467}
468
469fn todo_status_marker(status: &str) -> (&'static str, Option<&str>) {
470 match status.to_ascii_lowercase().as_str() {

Callers

nothing calls this directly

Calls 1

countMethod · 0.45

Tested by

no test coverage detected