function outstr = addblanks(varargin)
//-----------------------------------------------------------------------------
// 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
//-----------------------------------------------------------------------------

RHS = argn(2)
if(RHS==3)
    instr = varargin(1)
    pad  = varargin(2)
    side = varargin(3)
elseif(RHS==2)
    instr = varargin(1)
    pad  = varargin(2)
    side = 1
else
    outstr = varargin(1)
    return
end

tmp = code2str(ones(1,pad)*40);

if(side==1)
    outstr = tmp+instr
elseif(side==2)
    outstr = instr+tmp
elseif(side==3)
    outstr = tmp+instr+tmp
else
    outstr = instr
end

endfunction