arr.insertとarr.removeを追加 by salano-ym · Pull Request #654 · aiscript-dev/aiscript
Navigation Menu
{{ message }}
aiscript-dev / aiscript Public
- Notifications You must be signed in to change notification settings
- Fork 39
Merged
salano-ym merged 4 commits intoaiscript-dev:masterfrom
May 12, 2024Merged
salano-ym merged 4 commits intoaiscript-dev:masterfrom
salano-ym merged 4 commits intoaiscript-dev:masterfrom
Conversation
Copy link
Member
What
arr.insertとarr.removeを追加
@(v: arr).insert(index: num, item: value): null@(v: arr).remove(index: num): value | null
aiscript/docs/primitive-props.md
Lines 187 to 197 in f6993b2
| ### @(_v_: arr).insert(_index_: num, _item_: value): null | |
| **【この操作は配列を書き換えます】** | |
| 配列の _index_ の位置に _item_ を挿入します。\ | |
| _index_ が負の場合は末尾から数えます。\ | |
| _index_ が最後の要素より後の場合は末尾に追加します。 | |
| ### @(_v_: arr).remove(_index_: num): value | null | |
| **【この操作は配列を書き換えます】** | |
| 配列から _index_ の位置の要素を取り除き、その要素を返します。\ | |
| _index_ が負の場合は末尾から数えます。\ | |
| _index_ が最後の要素より後の場合は取り除かず、`null`を返します。 |
Why
Additional info (optional)
salano-ym added 3 commits
May 9, 2024 15:17
salano-ym
mentioned this pull request
6 tasks
salano-ym
requested review from
FineArchs and
uzmoi
FineArchs approved these changes May 10, 2024
uzmoi approved these changes May 10, 2024
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
salano-ym
merged commit
f96693a
into
aiscript-dev:master
salano-ym
deleted the
arr-insert-remove
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment