strtrim: Remove leading and trailing white space.

Description Usage Arguments Details Value See Also Examples

Description

Removes leading and trailing white space from a string.

Usage

1
2

Arguments

s

character string or character vector

Details

strTrim removes leading and trailing white space from a string or from all strings in a character vector.

deblank removes trailing white space only from a string or from all strings in a character vector.

Value

A character string or character vector with (leading and) trailing white space.

See Also

strjust

Examples

1
2
3
s <- c("  abc", "abc   ", " abc ", " a b c ", "abc", "a b c")
strTrim(s)
deblank(s)


Search within the pracma package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.