Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slice notation for vectors #393

anthonykasza opened this issue May 31, 2019 · 1 comment


None yet
4 participants
Copy link

commented May 31, 2019

It would be rather handy to have the capability to slice vectors (and strings too) in scriptland with a similar syntax to Python, e.g. v[0:5].
See #392


This comment has been minimized.

Copy link

commented May 31, 2019

Slicing a string should work already, just not for vectors. Or if you found that not working, please give an example of what you tried.

timwoj added a commit that referenced this issue Jun 12, 2019

timwoj added a commit that referenced this issue Jun 12, 2019

0xxon added a commit that referenced this issue Jun 20, 2019

Merge remote-tracking branch 'origin/topic/timw/393-vector-slicing'
* origin/topic/timw/393-vector-slicing:
  Fix memory leak in vector slice assignment
  Misc. tweaks to vector slicing implementation
  Add ability to grow/shrink a vector using slicing, also adds Insert/Remove methods for VectorVal
  Allow assignment for vectors using slices
  Check for integral slice indexes, add extra test for [:]
  Return an empty vector if the indices for slicing don't make sense
  GH-393: Add slice notation for vectors

@timwoj timwoj closed this Jun 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.