diff options
| author | Seba Gamboa <[email protected]> | 2015-10-08 13:26:23 -0300 |
|---|---|---|
| committer | Seba Gamboa <[email protected]> | 2015-10-08 13:26:23 -0300 |
| commit | 5dfdd53bcce1ad9bdea0ff214e31ec2366d6dcaa (patch) | |
| tree | d458e8e0b68b9497c31590060f0b9d4ebc7119db | |
| parent | e441fdaad8c769470bb55e3ed839e89b18164476 (diff) | |
| download | mruby-5dfdd53bcce1ad9bdea0ff214e31ec2366d6dcaa.tar.gz mruby-5dfdd53bcce1ad9bdea0ff214e31ec2366d6dcaa.zip | |
Merge doc/api/mruby/range.h.md docs
| -rw-r--r-- | include/mruby/range.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/mruby/range.h b/include/mruby/range.h index f97853fc5..008698fac 100644 --- a/include/mruby/range.h +++ b/include/mruby/range.h @@ -28,7 +28,18 @@ struct RRange { #define mrb_range_ptr(v) ((struct RRange*)(mrb_ptr(v))) #define mrb_range_value(p) mrb_obj_value((void*)(p)) -MRB_API mrb_value mrb_range_new(mrb_state*, mrb_value, mrb_value, mrb_bool); +/* + * Initializes a Range. + * + * If the third parameter is FALSE then it includes the last value in the range. + * If the third parameter is TRUE then it excludes the last value in the range. + * + * @param start the beginning value. + * @param end the ending value. + * @param exclude represents the inclusion or exclusion of the last value. + */ +MRB_API mrb_value mrb_range_new(mrb_state *mrb, mrb_value start, mrb_value end, mrb_bool exclude); + MRB_API mrb_bool mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, mrb_int len); mrb_value mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, const mrb_value *argv, mrb_value (*func)(mrb_state*, mrb_value, mrb_int)); |
