pub fn truncar_utf8(conteudo: &str, max_chars: usize) -> (String, bool)Expand description
Trunca uma string UTF-8 a no máximo max_chars codepoints.
Retorna (string_truncada, truncou). Se max_chars == 0 retorna string vazia.
Unicode-safe: opera sobre codepoints via chars(), nunca quebra no meio.