.hasSuffix

(@modyX, ignore us. I’m answering others here and it will get complicated fast.)

The fix is great.

String is obligated to preserve the same scalar sequence. If it did not, String.UnicodeScalarView, String.UTF8View, etc would all break.

Even if the entire API and implementation were overhauled in the future, there will always be access to preserved scalars for the text processing which needs it.

1 Like