JUSTIFY(s,length[,pad]) This function first removes all surplus space from s (as per SPACE(s) ), then attempts to right-justify s in a string of "length" characters by adding spaces between the words of s. If s does not fit in a field of "length" characters, the first "length" characters of s are returned. If the optional pad character is supplied, then the words in the output string are separated by instances of that character rather than by spaces.