From 49af1fca03173f415c5634dafdce3ee81cc01401 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 11 Jun 2021 12:26:58 +0900 Subject: readint.c: add new function `mrb_int_read`. Difference from `strtoul(3)`: * reads `mrb_int` based on configuration * specifies the end of the string * no sign interpretation * base 10 only --- include/mruby/value.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mruby/value.h b/include/mruby/value.h index 841cc7e6e..d9389b6fd 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -100,6 +100,7 @@ struct mrb_state; # define MRB_ENDIAN_LOHI(a,b) b a #endif +MRB_API mrb_int mrb_int_read(const char *p, const char *e, char **endp); #ifndef MRB_NO_FLOAT MRB_API double mrb_float_read(const char*, char**); #ifdef MRB_USE_FLOAT32 -- cgit v1.2.3