str_crush: Remove whitespace from a string

View source: R/str-crush.R

str_crushR Documentation

Remove whitespace from a string

Description

str_crush(), which removes all whitespace from a string, is the logical extension to stringr::str_trim() and stringr::str_squish().

Usage

str_crush(string)

Arguments

string

Input vector. Either a character vector, or something coercible to one.

Details

str_crush() is considered too specialized to be part of stringr.

Value

A character vector the same length as string.

See Also

stringr::str_trim() and stringr::str_squish()

Examples

str_crush("  String with trailing,  middle, and leading white space\t")

poissonconsulting/tidyplus documentation built on Jan. 26, 2025, 4:45 p.m.