Method: WordTree::Text.clean
- Defined in:
- ext/wordtree.cc
.clean(text) ⇒ Object
104 105 106 107 108 109 110 111 112 113 |
# File 'ext/wordtree.cc', line 104
static VALUE text_clean(VALUE self, VALUE text) {
rb_str_modify(text);
char* ctext = StringValueCStr(text);
size_t new_length = text_clean_cstr(ctext);
rb_str_set_len(text, (long)new_length);
return text;
}
|