Skip to contents

Split string into multiple inputs

Usage

cass_split_string(string, squish = TRUE, to_lower = TRUE, to_regex = FALSE)

Arguments

string

A text string, typically a user input in a shiny app.

to_regex

Defaults to FALSE. If TRUE collapses the split string, separating each element with |.

Value

A character vector

Examples

cass_split_string("dogs, cats, horses")
#> [1] "dogs"   "cats"   "horses"
cass_split_string(string = "dogs, cats, horses", to_regex = TRUE)
#> [1] "dogs|cats|horses"