You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been going back and forth on whether to include functions that support a start and end index to only operate on part of a CharSequence. I've landed on not including/removing such functionality.
Reasons for this are:
It keeps the API surface small(er).
CharSequence.codePointAt() can be used without special handling at the end of a partial sequence.
For a caller it's easy enough to use CharSequence.subSequence().
Most Java and Kotlin APIs don't support providing a start and end index either, e.g. CharSequence.forEach()
For feature parity with Java's String.codePointCount(int, int) our CharSequence.codePointCount() will be an exception and continue to support a start and end index.
Before changing CharSequence.codePointIterator(Int, Int) to remove the parameters, I'd like to hear arguments from people who wish for the library to keep supporting operations with a start and end index.
The text was updated successfully, but these errors were encountered:
I've been going back and forth on whether to include functions that support a start and end index to only operate on part of a
CharSequence
. I've landed on not including/removing such functionality.Reasons for this are:
CharSequence.codePointAt()
can be used without special handling at the end of a partial sequence.CharSequence.subSequence()
.CharSequence.forEach()
For feature parity with Java's
String.codePointCount(int, int)
ourCharSequence.codePointCount()
will be an exception and continue to support a start and end index.Before changing
CharSequence.codePointIterator(Int, Int)
to remove the parameters, I'd like to hear arguments from people who wish for the library to keep supporting operations with a start and end index.The text was updated successfully, but these errors were encountered: