Repository navigation
Add SegmentedStringView for split-string handling - #46
Merged
Merged
Conversation
…g_view, as this is the new canonical type for StringHandler::parseQuotedArguments.
…ts with outside allocator.
…, add info for future usage in FuncTree parsing.
…entCompletion to use it for unique value filtering
…ks and add performance improvement suggestions
…ce handling and iterator management, add iterator[] and several todos.
…rators to use custom iterators
…improve constructors
…ition size comparison.
…function for improved readability and maintainability
… Stream methods to utilize it
…ator adjustment logic
…ns for base directory and update settings
…ed string comparison
…r error handling and clarity. Reorganize tests.
…iew code structure
…d add new methods for iterator functionality
…ory positions more efficiently
…argument handling
Owner
Author
|
Checks seem to fail due to a missing file from one of the dependencies. Works locally, though... Might be an issue with the way fetchcontent works within github? I noticed some cloning issues lately, so maybe git clone silently fails with some repos, or this is a permission issue. Since the asset file is relatively simple, we might get away with storing a derived version locally. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch introduces
Nebulite::Utility::Args::SegmentedStringView, a non-owning wrapper around spans ofstd::string_viewsegments.It allows split command arguments to be inspected and compared as a logical string without first recombining them.
SegmentedStringViewis intended to become the common representation for argument parsing throughout the project.This pull request establishes the wrapper, but deliberately does not refactor every existing manual use of
std::span<std::string_view>.Those remaining usages can be migrated in a later change.
What changed
SegmentedStringViewwith:beginsWith,endsWith, andcontainstryGetAsSpanIteratorandStringViewIteratorfor traversal across segments and optimized contiguous comparisons.std::string_viewsegments and avoid unnecessary string allocations.FuncTreeargument parsing and completion handling to use string views more consistently.Testing and benchmarking
SegmentedStringView-to-SegmentedStringViewcomparisonscontainschecks and segmented-view equality.