Module: CharGuess
- Defined in:
- ext/charguess/charguess.c
Class Method Summary collapse
Class Method Details
.guess(str) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'ext/charguess/charguess.c', line 8
static VALUE cg_s_guess(VALUE klass, VALUE str) {
const char*ptr;
int ret;
Check_Type(str, T_STRING);
ret = CharGuessInit();
ptr = GuessChardet((const char *)RSTRING(str)->ptr);
ret = CharGuessDone();
return ptr ? rb_str_new2(ptr) : Qnil;
}
|