str_rm_blank_space {textTools}R Documentation

Remove and replace excess white space from strings.

Description

Remove and replace excess white space from strings.

Usage

str_rm_blank_space(x, replacement = " ")

Arguments

x

A vector or string.

replacement

A string to replace the blank space with, defaults to " ", which replaces excess space with a single space.

Value

x, with extra white space removed/replaced.

Examples

str_rm_blank_space(c("this     is   a test.  ", "    will it    work? "))

[Package textTools version 0.1.0 Index]