rust repeat character n times code example Example: rust repeat character x times let formatted_title = format!("{:-^1$}", title, n);