klyn.String.center
method
public center(width as Int, fill as Char = ' ') as String:
Description

Centers this string to the target width.

Parameters
  • width Target width.
  • fill Fill character (default: space).
Returns

A new padded string, or this string when it is already wide enough.

Example
assert "Klyn".center(8, '.') == "..Klyn.."