Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | ATOMS
File : Details
Login with GitLab

add blanks to a string

Adds a specified number of blanks to front, back or both of a string
(1774 downloads for this version - 1774 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.
Login with GitLab
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.