summaryrefslogtreecommitdiff
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
authorCameron Reikes <cameronreikes@gmail.com>2019-07-16 18:31:58 -0700
committerCameron Reikes <cameronreikes@gmail.com>2019-09-14 13:08:28 -0700
commit757c509437720b50056bd67f8d4e463c38c5b13e (patch)
tree2a1f4235d5e4c340472972dba0d39b504d2e54c8 /core/variant_call.cpp
parent24e1039eb6fe32115e8d1a62a84965e9be19a2ed (diff)
Add array slice method
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 5e3876d6a4..c288c50abf 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -534,6 +534,7 @@ struct _VariantCall {
VCALL_LOCALMEM2R(Array, bsearch);
VCALL_LOCALMEM4R(Array, bsearch_custom);
VCALL_LOCALMEM1R(Array, duplicate);
+ VCALL_LOCALMEM4R(Array, slice);
VCALL_LOCALMEM0(Array, invert);
VCALL_LOCALMEM0R(Array, max);
VCALL_LOCALMEM0R(Array, min);
@@ -1759,6 +1760,7 @@ void register_variant_methods() {
ADDFUNC4R(ARRAY, INT, Array, bsearch_custom, NIL, "value", OBJECT, "obj", STRING, "func", BOOL, "before", varray(true));
ADDFUNC0NC(ARRAY, NIL, Array, invert, varray());
ADDFUNC1R(ARRAY, ARRAY, Array, duplicate, BOOL, "deep", varray(false));
+ ADDFUNC4R(ARRAY, ARRAY, Array, slice, INT, "begin", INT, "end", INT, "step", BOOL, "deep", varray(1, false));
ADDFUNC0R(ARRAY, NIL, Array, max, varray());
ADDFUNC0R(ARRAY, NIL, Array, min, varray());