-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Containers: rework slicing APIs for more consistency.
The bulk of work is mainly in how these are presented and documented, with just two of them being deprecated in favor of better-named variants: - except() is now exceptSuffix(), since that's how I named the new StringView API that removes a string suffix, and it just makes much more sense that way. Too bad it took me so long to realize a good name. - As a consequence, suffix() is now exceptPrefix(), again consistent with the StringView API, because both take a prefix length and not suffix length. This means, once enough time passes (say, a year after a release the deprecated API gets removed, and then again a year), it can be reintroduced taking a *suffix* length, since that's what it should have been since the beginning. But again, I realized the inconsistency way too late. To ensure nothing is broken, existing code is not adapted to these changes -- only a new test is added for a new suffix<count>() which could be added without clashes. Adapting the code will be done in the next commit.
- Loading branch information
Showing
11 changed files
with
741 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.