Skip to contents

This function cleans leading, trailing and multiple "white spaces" from character strings.

Usage

clean_whitespaces(string)

Arguments

string

character A character or vector of characters to clean.

Value

The string without leading, trailing or multiple "white spaces".

Details

This function adds the removal of multiple "white spaces" to the function trimws from base package.

Author

Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.