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")
A character string, or a vector of strings
Characters that are trimmed from the left side.
Characters that are trimmed from the right side
Trimmed string(s)
left and right can be set to NULL. In such cases no trimming will be performed.
left
right
# NOT RUN { myStrings <- c("This is a fine day\n", " Hallo Professor!", " NUR DER HSV ") trim(myStrings) # }
Run the code above in your browser using DataLab