center

fnS center(S)(S s, size_t width, dchar fillChar = ' ') if (isSomeString!S)

Center s in a field width characters wide. fillChar is the character that will be used to fill up the space in the field that s doesn't fill.

Parameters

sThe string to center
widthWidth of the field to center s in
fillCharThe character to use for filling excess space in the field

Returns

The resulting _center-justified string. The returned string is

GC-allocated. To avoid GC allocation, use centerJustifier instead.