extend_char_vec: Pad a character vector with empty strings.

View source: R/str-pad.R

extend_char_vecR Documentation

Pad a character vector with empty strings.

Description

Extend a character vector by appending empty strings at the end.

Usage

extend_char_vec(char_vec, extend_by = NA, length_out = NA)

str_extend_char_vec(char_vec, extend_by = NA, length_out = NA)

Arguments

char_vec

A character vector. The thing you wish to expand.

extend_by

A non-negative integer. By how much do you wish to extend the vector?

length_out

A positive integer. How long do you want the output vector to be?

Value

A character vector.

Examples

extend_char_vec(1:5, extend_by = 2)
extend_char_vec(c("a", "b"), length_out = 10)

filesstrings documentation built on May 29, 2024, 3:32 a.m.