Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - Русский - 日本語
Scilab Help >> Strings > stripblanks

stripblanks

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

Syntax

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)+'?')
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:39 CEST 2016