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

zstring_span and czstring_span #136

Closed
cbeck88 opened this issue Aug 22, 2018 · 5 comments
Closed

zstring_span and czstring_span #136

cbeck88 opened this issue Aug 22, 2018 · 5 comments

Comments

@cbeck88
Copy link

cbeck88 commented Aug 22, 2018

The Microsoft GSL contains a special string span called zstring_span used to represent a string span known to have a null-terminator. This can be useful for interacting with legacy APIs, and avoiding use of raw pointers / calls to ::strlen except at API boundary.

See "class basic_zstring_span" and typedefs for zstring_spanandczstring_span`:
https://github.com/Microsoft/GSL/blob/master/include/gsl/string_span#L389

It appears to me that gsl-lite doesn't have these types -- is that intentional or merely an oversight? Would you accept a patch to provide them?

@martinmoene
Copy link
Collaborator

I might have simply missed the addition of zstring_span and siblings to M-GSL.

I'd welcome a PR to add these, preferably including test cases (and entry in the table under Features).

chan-lee referenced this issue in chan-lee/gsl-lite Apr 12, 2019
- zstring_span, wzstring_span, czstring_span, cwzstring_span added
- tests are not added yet
martinmoene referenced this issue Apr 12, 2019
- zstring_span, wzstring_span, czstring_span, cwzstring_span added
- tests are not added yet
@martinmoene
Copy link
Collaborator

martinmoene commented Apr 12, 2019

ToDo:

  • Add tests
  • Add entry in the table under Features.

@martinmoene
Copy link
Collaborator

@cbeck88 Can this issue be closed?

@cbeck88
Copy link
Author

cbeck88 commented Apr 16, 2019

thank you!

@cbeck88
Copy link
Author

cbeck88 commented Apr 16, 2019

yes!

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

No branches or pull requests

2 participants