Learn R Programming

lettercase (version 0.13.1)

str_delete_whitespace: Common string transformations

Description

Perform common transformations on strings

Usage

str_delete_whitespace(string)
str_delete_separators(string)
str_delete_nonword(string)
str_expand_capwords(string)
str_delete_leading_nonword(string)
str_delete_space(string)

Arguments

string
character vector

These function take a single character vector argument and return a character vector that has had one or more functions applied to it. They are the building blocks for building up case transformations.

Value

character vector

Examples

Run this code
# TRANSFORMATIONS
  str_ucfirst( "abc def" )              # Abc Def
  str_expand_capwords( "AbcDef")        # Abc Def

# DELETION
  str_delete_whitespace( "ABC 123" )    # ABC123
  str_delete_separators( "A_B-C.123" )  # ABC123
  str_delete_nonword( "ABC & 123" )     # ABC123

Run the code above in your browser using DataLab