Function debug_long_utf8

Source
pub fn debug_long_utf8(s: impl AsRef<str>, max_chars: usize) -> String
Expand description

Debug print a long string by truncating to n characters

Enabled with the truncate-debug feature flag, which is enabled by default.

If debugging large outputs is needed, set swiftide_core to no-default-features

ยงExample

โ“˜
let s = debug_long_utf8("๐Ÿฆ€".repeat(10), 3);

assert_eq!(s, "๐Ÿฆ€๐Ÿฆ€๐Ÿฆ€ (10)");