returns string formatted by adding pad characters between blank-delimited words to justify to both margins. This is done to width length (length must be a positive whole number or zero). The default pad character is a blank.>>-JUSTIFY--(--string--,--length--+--------+--)---------------->< '-,--pad-'
The first step is to remove extra blanks as though SPACE(string) had been run (that is, multiple blanks are converted to single blanks, and leading and trailing blanks are removed). If length is less than the width of the changed string, the string is then truncated on the right and any trailing blank is removed. Extra pad characters are then added evenly from left to right to provide the required length, and the pad character replaces the blanks between words.
JUSTIFY('The blue sky',14) -> 'The blue sky'
JUSTIFY('The blue sky',8) -> 'The blue'
JUSTIFY('The blue sky',9) -> 'The blue'
JUSTIFY('The blue sky',9,'+') -> 'The++blue'