Skip to content

Conversation

@salano-ym
Copy link
Member

@salano-ym salano-ym commented May 9, 2024

What

arr.insertarr.removeを追加

  • @(v: arr).insert(index: num, item: value): null
  • @(v: arr).remove(index: num): value | null

### @(_v_: arr).insert(_index_: num, _item_: value): null
**【この操作は配列を書き換えます】**
配列の _index_ の位置に _item_ を挿入します。\
_index_ が負の場合は末尾から数えます。\
_index_ が最後の要素より後の場合は末尾に追加します。
### @(_v_: arr).remove(_index_: num): value | null
**【この操作は配列を書き換えます】**
配列から _index_ の位置の要素を取り除き、その要素を返します。\
_index_ が負の場合は末尾から数えます。\
_index_ が最後の要素より後の場合は取り除かず、`null`を返します。

Why

#612

Additional info (optional)

@FineArchs

This comment was marked as off-topic.

@uzmoi

This comment was marked as off-topic.

@FineArchs

This comment was marked as off-topic.

@salano-ym

This comment was marked as off-topic.

@FineArchs

This comment was marked as off-topic.

@FineArchs

This comment was marked as off-topic.

@salano-ym salano-ym merged commit f96693a into aiscript-dev:master May 12, 2024
@salano-ym salano-ym deleted the arr-insert-remove branch May 12, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants