Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | ATOMS
File : Details
Please login or create an account
Dear visitors/customers, we are migrating most of Scilab services into a new data center.
Note that login/registration will not be available for the moment.

add blanks to a string

Adds a specified number of blanks to front, back or both of a string
(558 downloads for this version - 558 downloads for all versions)
Details
Version
1.0
Author
david adams
Maintainer
David Adams
Category
License
Supported Scilab Version
5.3
Creation Date
February 24, 2011
Description
             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            
Files (1)
[874 bytes]
Miscellaneous file
Scilab script
News (0)
Comments (1)     Leave a comment 
Comment from Allan Cornet -- February 24, 2011, 06:16:21 AM    
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
Leave a comment
You must register and log in before leaving a comment.
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.