string or forward range of characters
minimum field width
used to pad end up to width characters
a lazy range of the center justified result
import std.algorithm.comparison : equal; import std.utf : byChar; assert(centerJustifier("hello", 2).equal("hello".byChar)); assert(centerJustifier("hello", 8).equal(" hello ".byChar)); assert(centerJustifier("hello", 7, 'x').equal("xhellox".byChar));
Center justify r in a field width characters wide. fillChar is the character that will be used to fill up the space in the field that r doesn't fill.