Switch to edit mode.
Name(s): centre center1: ":center/re (string, width[, lfill[, rfill]]) => centered string in field"
2: "Left and right fillers default to spaces. Bilingualism-aware."
3: {string, len, ?lfill = " ", ?rfill = lfill} = args
4: string = this:slice_tagged(tostr(string), len)
5: if ((l = $msg:string_length(string)) < len)
6: string = this:space((len - l) / 2, lfill) + string + this:space((len - l + 1) / -2, rfill)
7: endif
8: return string