addblanks - adds blanks to front or back of a string INPUTS: Input_string - obviously a string N - number of spaces to add side: 1 - front 2 - Back 3 - both
Scilab script
Upload date : 2011-02-24 01:51:14 MD5 : 7138b2f02129c2c13364ec473c596208 SHA1 : 5566c6a69f4bbbfabd0c764849ecb57b2bcfe1c9 Downloads : 1774
Hi, good small function ;) Some advice about your code: replaces : code2str(ones(1,pad)*40) by blanks (help blanks) input argument are not really checked in this first version ex: addblanks('toto',4,1,'blabla') Allan