StrTrim(x, pattern = " \t\n", method = "both")
nchar
, match
, grep
, regexpr
, substr
, sub
, gsub
,
StrTrunc
, StrDist
StrTrim("Hello world! ")
StrTrim("Hello world! ", method="left")
StrTrim("Hello world! ", method="right")
# user defined pattern
StrTrim("..Hello ... world! ", pattern="\\.")
Run the code above in your browser using DataLab