erase_after {cppcontainers} | R Documentation |
Erase elements
Description
Delete elements from a forward list by reference.
Usage
erase_after(x, from, to)
Arguments
x |
A CppForwardList object. |
from |
Index after which to delete. |
to |
Index until including which to delete. Indices start at 1. The function does not perform bounds checks. Indices outside |
Value
Invisibly returns NULL
.
See Also
Examples
l <- cpp_forward_list(4:9)
l
# 4 5 6 7 8 9
erase_after(l, 2L, 4L)
l
# 4 5 8 9
[Package cppcontainers version 1.0.0 Index]