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

umx_explodeR Documentation

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

umx_explode("", "dog") # "d" "o" "g"
umx_explode(" ", "cats and dogs") # [1] "cats" "and"  "dogs"

umx documentation built on May 29, 2024, 5:40 a.m.