str_paste_elems {filesstrings}R Documentation

Extract bits of a string and paste them together

Description

Extract characters - specified by their indices - from a string and paste them together

Usage

str_paste_elems(string, indices)

Arguments

string

A string.

indices

A numeric vector of positive integers detailing the indices of the characters of string that we wish to paste together.

Value

A string.

Examples

str_paste_elems("abcdef", c(2, 5:6))

[Package filesstrings version 2.5.0 Index]