str_all_substrings: Find all substrings of a given length

View source: R/string-utils.R

str_all_substringsR Documentation

Find all substrings of a given length

Description

Find all substrings of a given length

Usage

str_all_substrings(x, n)

Arguments

x

The input string. Non-character inputs will be coerced with as.character().

n

The length of the desired substrings.

Value

A character vector containing all the length n substrings of x. If x has length > then a list is returned containing an entry for each input element.


levitate documentation built on Oct. 1, 2023, 1:08 a.m.