robson-core 0.0.2

Rust async agent orchestrator for automated development workflows
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub fn truncate_log(s: &str, max_chars: usize) -> String {
    if s.chars().count() <= max_chars {
        return s.to_string();
    }
    let byte_pos = s
        .char_indices()
        .nth(max_chars)
        .map(|(pos, _)| pos)
        .unwrap_or(s.len());
    format!("{}...[truncated]", &s[..byte_pos])
}