arr.insertとarr.removeを追加 by salano-ym · Pull Request #654 · aiscript-dev/aiscript

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@salano-ym

Copy link

Member

@salano-ym salano-ym commented

May 9, 2024

edited

Loading

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)

uzmoi reacted with thumbs up emoji

@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

Reviewers

@uzmoi uzmoi uzmoi approved these changes

@FineArchs FineArchs FineArchs approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@salano-ym @FineArchs @uzmoi