Pad.m

From Spinach Documentation Wiki
Jump to: navigation, search

Pads or cuts a string with spaces to make it n characters long. Syntax:

            output_string=pad(input_string,new_length,side)

where input_string and output_string are character strings and new_length is a positive integer number. The optional side argument ('left' or 'right') controls the side from which the string is padded.