Is there a simple way to have text that looks like this?
--- text ---
--- fills a certain width? I've tried
but here if "text" is "text_1" in one case and "text_123" in another, then the total width of the text plus rule varies in each case.