powered by
Returns string without leading or trailing whitespace, like the php function. See also built-in base::trimws() does the same.
base::trimws()
umx_trim(string, removeThis = NULL)
string
to trim
if not NULL then this regular expression is removed wherever found in 'string'
https://tbates.github.io, https://github.com/tbates/umx
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_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"
Run the code above in your browser using DataLab