public center(width as Int, fill as Char = ' ') as String:
Centers this string to the target width.
| Parameter | Description |
|---|---|
width | Target width. |
fill | Fill character (default: space). |
A new padded string, or this string when it is already wide enough.
assert "Klyn".center(8, '.') == "..Klyn.."