centerAlignText

Center-aligns text

If text.length > width, the exceeding characters are removed

dstring
centerAlignText
(
dstring text
,
uinteger width
,
dchar fill = ' '
)

Return Value

Type: dstring

the text center aligned in a string

Examples

st{
	assert("qwr".centerAlignText(7) == "  qwr  "

Meta