<< strings Strings strncpy >>

Scilab Help >> Strings > stripblanks

stripblanks

strips / trims leading and trailing blanks (and tabs) of strings

Calling Sequence

txt = stripblanks(txt[,tabs])

Arguments

txt

a character string or matrix of character strings.

tabs

a boolean, if %t then tabs are also stripped (default value is %f).

Description

The stripblanks function strips / trims leading and trailing blanks (and tabs) of strings.

Examples

a='  123   ';
'!'+a+'!'
'!'+stripblanks(a)+'!'
a=['  123   ',' xyz']
strcat(stripblanks(a))

a = msprintf("\t  \tHello world!\t\t")
strcat(stripblanks(a,%f)+'?')
strcat(stripblanks(a,%t)+'?')

Report an issue
<< strings Strings strncpy >>