Header: mruby/range.h

Overview

Range class

Included heaers

Function Summary collapse

Define Summary

#define MRUBY_RANGE_H
#define mrb_range_ptr
#define mrb_range_value

Function Details

mrb_value mrb_range_new(mrb_state * mrb, mrb_value start, mrb_value end, mrb_bool exclusive)

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.

Parameters:

  • start

    the beginning value.

  • end

    the ending value.

  • exclusive

    represents the inclusion or exclusion of the last value.

mrb_bool mrb_range_beg_len(mrb_state * mrb, mrb_value range, mrb_int * begp, mrb_int * lenp, mrb_int len)