swift-algorithms icon indicating copy to clipboard operation
swift-algorithms copied to clipboard

Update Suffix.swift

Open mattyoung opened this issue 3 years ago • 1 comments

Change endOfPrefix(while:) and startOfSuffix(while:) from internal to public

These two functions are generally useful so they should be public instead of internal See https://forums.swift.org/t/should-there-be-bidirectionalcollection-droplast-while/48059/14 and https://forums.swift.org/t/endofprefix-while-and-startofsuffix-while-should-be-public-instead-of-internal/56855

Checklist

  • [ ] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [ ] I've updated the documentation if necessary

mattyoung avatar Apr 20 '22 23:04 mattyoung

Since we are making those public, couple of points are think are worth mention:

  • We probably need to add this to Changelog.md
  • We also may need a Guide the same way we have for all other algorithms here. See Guides for reference.
  • Add entry to the Readme.md
  • Verify if we have tests for those methods? I believe we test that indirectly through the public methods that use them internally, but not sure we have tests for them specifically (probably have, but maybe it is worth check)

lucianopa-msft avatar Apr 21 '22 02:04 lucianopa-msft

Landing this change in #211.

natecook1000 avatar Nov 14 '23 17:11 natecook1000