This function returns text that is centered for a specific length.
result = Centre( string, length [, pad ] )
Or, result = Center( string, length [, pad ] ) |
Examples:
say Centre( 'magic', 3 ) -- shows 'agi' say Centre( 'magic', 2 ) -- shows 'ag say Center( 'magic', 7 ) -- shows ' magic ' say Center( 'magic', 7, ' ' ) -- shows ' magic ' say Center( 'magic', 7, '+' ) -- shows '+magic+' |