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

Implement .lines() method on various string slices #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mr-adult
Copy link

@mr-adult mr-adult commented Feb 1, 2025

In reference to this issue, I have implemented a .lines() method on Utf16Str and Utf32Str as well as a lines_lossy() method on U16Str and U32Str.

There may be other string types in this crate where this could make sense, but these were the most pressing for my use-case. I'm happy to implement any others that would be necessary before merging.

There may also be a use for implementing DoubleEndedIterator here since the standard library implementation does, but I think most use-cases will be iterating through the lines in sequentially forward order.

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