powered by
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)
A character string, or a vector of strings
Characters that are trimmed from the left side.
Characters that are trimmed from the right side
Jitao David Zhang <jitao_david.zhang@roche.com>
left and right can be set to NULL. In such cases no trimming will be performed.
left
right
myStrings <- c("This is a fine day\n", " Hallo Professor!", " NUR DER HSV ") trim(myStrings)
Run the code above in your browser using DataLab