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

SystemString api consistency improvements #155

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

glessard
Copy link
Contributor

@glessard glessard commented Mar 8, 2024

While working on #154, I found a few little inconsistencies in the implementation of the SystemString type. This PR fixes the inconsistencies I found.

@glessard
Copy link
Contributor Author

glessard commented Mar 8, 2024

@swift-ci please test

@glessard
Copy link
Contributor Author

glessard commented Mar 8, 2024

@swift-ci please test

@glessard glessard force-pushed the system-string-api-consistency branch from 29d2b2e to 605f850 Compare March 8, 2024 01:36
- SystemString.string and Slice<SystemString>.string should be generated in the same manner. Now they are.
- The original implementation includes a trailing zero with the full collection, but the implementation for a slice does not. As a result, given a `let s: SystemString`, `s.string` was not equal to `s[…].string`
- `withNullTerminatedSystemChars` makes it clear that the null-termination is included. Operations where the null-termination is included should be obvious.
@glessard glessard force-pushed the system-string-api-consistency branch from 605f850 to 6609a40 Compare March 8, 2024 20:16
@glessard
Copy link
Contributor Author

glessard commented Mar 8, 2024

@swift-ci please test

@glessard glessard marked this pull request as ready for review March 9, 2024 01:01
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

Successfully merging this pull request may close these issues.

None yet

1 participant