Method: U::String#each_word

Defined in:
ext/u/rb_u_string_each_word.c

#each_word {|word| ... } ⇒ self #each_wordEnumerator Also known as: words

Overloads:



24
25
26
27
28
29
30
31
32
33
34
# File 'ext/u/rb_u_string_each_word.c', line 24

VALUE
rb_u_string_each_word(VALUE self)
{
        RETURN_ENUMERATOR(self, 0, NULL);

        const struct rb_u_string *string = RVAL2USTRING(self);
        const char *p = USTRING_STR(string);
        size_t length = USTRING_LENGTH(string);
        u_words(p, length, (u_substring_fn)each, &self);
        return self;
}