trimcpp: Remove leading and trailing spaces of strings in a vector...

View source: R/RcppExports.R

trimcppR Documentation

Remove leading and trailing spaces of strings in a vector (C++)

Description

This function removes all leading or trailing white space, including space (' '), form feed (\f), line feed (\n), carriage return (\r', horizontal tab (\t), and vertical tab (\v), from a character vector.

Usage

trimcpp(s)

Arguments

s

A character vector.

Value

A character vector.

Examples


x <- c(" leading", "trailing ", " both ")
trimcpp(x)


YangWu1227/citizenr documentation built on June 18, 2022, 12:17 p.m.