patch 8.2.2344: using inclusive index for slice is not always desired
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
#7408)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index a891378..0e800c2 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1500,6 +1500,8 @@
ret_float, FLOAT_FUNC(f_sin)},
{"sinh", 1, 1, FEARG_1, NULL,
ret_float, FLOAT_FUNC(f_sinh)},
+ {"slice", 2, 3, FEARG_1, NULL,
+ ret_first_arg, f_slice},
{"sort", 1, 3, FEARG_1, NULL,
ret_first_arg, f_sort},
{"sound_clear", 0, 0, 0, NULL,