The function trims leading and/or tailing spaces from string(s), using C function implemented in the BIOS library.
trim(x, left = " \n\r\t", right = " \n\r\t")
Trimmed string(s)
left
and right
can be set to NULL. In such cases no trimming
will be performed.
myStrings <- c("This is a fine day\n",
" Hallo Professor!",
" NUR DER HSV ")
trim(myStrings)
#> [1] "This is a fine day" "Hallo Professor!" "NUR DER HSV"