umx (version 1.9.1)

umx_explode: umx_explode - like the php function `explode`

Description

Takes a string and returns an array of delimited strings (by default, each 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

- http://tbates.github.io, https://github.com/tbates/umx, http://php.net/manual/en/function.explode.php

See Also

Other String Functions: umx_explode_twin_names, umx_grep, umx_rot, umx_trim

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