centerText
centerText(
text
,width
):string
Centers the given text in a field of the given width, padding with spaces on both sides.
Parameters
Section titled “Parameters”string
the word or phrase to center
number
the total width of the field (including text)
Returns
Section titled “Returns”string
the centered string (or the original text if width ≤ text.length)