Trim whitespace surrounding a string.
Returns string without leading or trailing whitespace, like the php function.
See also built-in base::trimws() does the same.
umx_trim(string, removeThis = NULL)
string |
to trim |
removeThis |
if not NULL then this regular expression is removed wherever found in 'string' |
string
Other String Functions:
umx_explode_twin_names(),
umx_explode(),
umx_grep(),
umx_names(),
umx_paste_names(),
umx_rot(),
umx_str_chars(),
umx_str_from_object(),
umx
umx_trim(" dog") # "dog"
trimws(" dog ", "l") # added by R in v 3.3.0
umx_trim("dog ") # "dog"
umx_trim("\t dog \n") # "dog"
umx_trim("xlsx dog.xlsx", "\\.?xlsx ?") # "dog"Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.