Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Slicing pattern with range #1306

Closed
ahsonkhan opened this issue Mar 11, 2017 · 4 comments
Closed

Slicing pattern with range #1306

ahsonkhan opened this issue Mar 11, 2017 · 4 comments

Comments

@ahsonkhan
Copy link
Member

@davidfowl
Does slicing using a range refer to code like this (using '..')?

Span<byte> buffer = ...

Span<byte> view1 = buffer.Slice(3, 2);
Span<byte> view2 = buffer[3..4];
 
// view1 == view2
@KrzysztofCwalina
Copy link
Member

@ahsonkhan, do you still want to keep this open?

@ahsonkhan
Copy link
Member Author

That depends on whether we want to support range syntax or not.
This was from the initial discussion/backlog of span items where we were considering slicing using range. I presume that is what the syntax would look like.

Changing to future.

@ahsonkhan
Copy link
Member Author

@KrzysztofCwalina, if we are getting the Range syntax support by 2.1, we should consider adding support for it for Span. Should we change the milestone of this issue to 2.1? Let me know and I will move it over to corefx.

@KrzysztofCwalina
Copy link
Member

Yeah, once we settle on the design for Range, we can add APIs. I would not add them sooner.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants