trim_marginal_whitespace {Claddis} | R Documentation |
Trims any marginal whitespace from a vector of character string(s).
trim_marginal_whitespace(x)
x |
A character string |
Trims any marginal whitespace (spaces or tabs) from a vector of character string(s).
A vector of character string(s) with any leading or trailing whitespace removed.
Graeme T. Lloyd graemetlloyd@gmail.com
# Example string:
x <- " \td s f\t s "
# Trim only marginal whitespace:
trim_marginal_whitespace(x)