splice:当LENGTH的结尾超过数组时,它可以吗?(splice: is it ok when the end of LENGTH is past of the array?)

编程入门 行业动态 更新时间:2024-10-25 06:32:48
splice:当LENGTH的结尾超过数组时,它可以吗?(splice: is it ok when the end of LENGTH is past of the array?)

拼接

是不是可以,当OFFSET在数组中但LENGTH的结尾超过数组的末尾时?

splice

Is it OK, when OFFSET is within the array but the end of LENGTH is past the end of the array?

最满意答案

容易尝试。

$ perl -wE' my @a = "a".."e"; my @b = splice @a, 2, 10; say 0+@b, " elements were removed."; say 0+@a, " elements remain." ' 3 elements were removed. 2 elements remain.

我完全相信这不会改变。

Easy to try.

$ perl -wE' my @a = "a".."e"; my @b = splice @a, 2, 10; say 0+@b, " elements were removed."; say 0+@a, " elements remain." ' 3 elements were removed. 2 elements remain.

I have every confidence that this will not change.

更多推荐

本文发布于:2023-07-25 05:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1256726.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:它可以   数组   结尾   splice   LENGTH

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!