GC-allocated. To avoid GC allocation, use centerJustifier instead.
center
fn
S 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
s | The string to center |
width | Width of the field to center s in |
fillChar | The character to use for filling excess space in the field |
Returns
The resulting _center-justified string. The returned string is