This function 'slices' the strings of a character vector
x at consecutive indices
n, thereby generating consecutive substrings of length
and returning the result as a list. This function will safely 'slice' a
UTF-8 encoded vector.
a character vector.
integer (or numeric coercible to integer); index at which to slice.
logical. if names attribute already
A list of length equal to the length of
x, with each element
made up of the substrings generated from
Safe for use with UTF-8 characters, but slower than
str_slice, for slicing an ASCII vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.