sf_split {stringfish}R Documentation

sf_split

Description

A function to split strings by a delimiter

Usage

sf_split(subject, split, encode_mode = "auto", fixed = FALSE)

Arguments

subject

A character vector

split

A delimiter to split the string by

encode_mode

"auto", "UTF-8" or "byte". Determines multi-byte (UTF-8) characters or single-byte characters are used.

fixed

determines whether the split parameter should be interpreted literally or as a regular expression

Value

A list of stringfish character vectors

See Also

strsplit

Examples

sf_split(datasets::state.name, "\\s") # split U.S. state names by any space character

[Package stringfish version 0.13.2 Index]