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