center/centre >>-+-center(-+-length-+--------+-)----------------------------->< +-centre(-+ +-,--pad-+ Returns a string of length [length] with the receiving string centered in it. The [pad] characters are added as necessary to make up length. The [length] must be a positive whole number or zero. The default [pad] character is blank. If the receiving string is longer than [length] , it is truncated at both ends to fit. If an odd number of characters are truncated or added, the right-hand end loses or gains one more character than the left-hand end. Note To avoid errors because of the difference between British and American spellings, this method can be called either [center] or [centre]. String class - center method abc~center(7) -> " ABC " abc~CENTER(8,"-") -> "--ABC---" "The blue sky"~centre(8) -> "e blue s" "The blue sky"~centre(7) -> "e blue " |