Skip to content

str: add an iterator - #36

Merged
tspader merged 8 commits into
mainfrom
str/iterator
Oct 12, 2026
Merged

tspader merged 8 commits into
mainfrom
str/iterator

Conversation

@tspader

@tspader tspader commented Oct 12, 2026

Copy link
Copy Markdown
Owner

We've had sp_str_split and sp_str_cleave for a long time, and upstream in spn I wrote a line iterator. This PR makes the line iterator general by allowing you to specify the delimiter.

Ported the string tests to sp_test.h while they were getting touched. Removed sp_str_view, which is fully redundant with sp_cstr_as_str. Removed sp_str_sub_reverse, which doesn't make anything more ergonomic as compared to the other related APIs.

@tspader
tspader merged commit 30e4f58 into main Oct 12, 2026
8 checks passed
@tspader
tspader deleted the str/iterator branch October 12, 2026 17:46
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.

1 participant