Learn R Programming

umx (version 4.9.0)

umx_explode: Explode a string (Like the php function explode)

Description

Takes a string and returns an array of delimited strings (by default, each single character)

Usage

umx_explode(delimiter = character(), string)

Arguments

delimiter

what to break the string on. Default is empty string ""

string

an character string, e.g. "dog"

Value

  • a vector of strings, e.g. c("d", "o", "g")

References

See Also

Other String Functions: umx_explode_twin_names(), umx_grep(), umx_names(), umx_paste_names(), umx_rot(), umx_str_chars(), umx_str_from_object(), umx_trim(), umx

Examples

Run this code
# NOT RUN {
umx_explode("", "dog") # "d" "o" "g"
umx_explode(" ", "cats and dogs") # [1] "cats" "and"  "dogs"
# }

Run the code above in your browser using DataLab