trim {lazy.irtx}R Documentation

trim leading and trailing blanks

Description

trim leading and trailing blanks

Usage

trim(x, leading = FALSE, trailing = TRUE, middle = FALSE, all = FALSE,
  blank = " ")

Arguments

x

string

leading

= 1 to remove the leading blanks

trailing

= 1 to remove the trailing blanks

middle

= 1 to replace consecutive blanks by one (compress)

all

= 1 to remove the leading and trailing blanks and compress

blank

= a character

Value

trimed string

Examples

trim("  c a p r i   ci ous  " )
trim("  c a p r i   ci ous  ", leading=1, trailing=0 )
trim("  c a p r i   ci ous  ", middle=1 )
A=demomat(3,3,root="a"); A[1,1]="  a11"; A[2,2]="   a22 "
trim(A,all=1)

[Package lazy.irtx version 1.0.1 Index]