Learn R Programming

umx (version 1.7.5)

umx_trim: umx_trim

Description

returns string w/o leading or trailing whitespace

Usage

umx_trim(string, removeThis = NULL)

Arguments

string

to trim

removeThis

if not NULl then this string is removed whereever found in 'string'

Value

- string

References

- http://tbates.github.io, https://github.com/tbates/umx, http://openmx.ssri.psu.edu

See Also

Other String Functions: umx_explode_twin_names, umx_explode, umx_rot

Examples

Run this code
# NOT RUN {
umx_trim(" dog") # "dog"
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