Function rb_str_split

Source
pub unsafe extern "C" fn rb_str_split(
    str_: VALUE,
    delim: *const c_char,
) -> VALUE
Expand description

Divides the given string based on the given delimiter. This is the 1-argument 0-block version of String#split.

ยง@param[in] str Object in question to split. @param[in] delim Delimiter, in C string. @exception rb_eTypeError str has no implicit conversion to String. @exception rb_eArgError delim is a null pointer. @return An array of strings, which are substrings of the passed str. If delim is an empty C string (i.e. ""), str is split into each characters. If delim is a C string whose sole content is a whitespace (i.e. " "), str is split on whitespaces, with leading and trailing whitespace and runs of contiguous whitespace characters ignored. Otherwise, str is split according to delim.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3