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)");