Function docker_bisect::truncate

source ·
pub fn truncate(s: &str, max_chars: usize) -> &str
Expand description

Truncates a string to a single line with a max width and removes docker prefixes.

Example

use docker_bisect::truncate;
let line = "blar #(nop) real command\n line 2";
assert_eq!("real com", truncate(&line, 8));