I currently use this function to trim spaces from a string
function trim(str){
nsub1=sub("^[ ]*", "", str)
nsub2=sub("[ ]*$", "", str)
return str
}
I tried to use
nsub1=sub("^[ ]*", "\t", str)
nsub3=sub("[...