Skip to content

v0.3.0

Latest

Choose a tag to compare

@DmitryNekrasov DmitryNekrasov released this 07 Oct 18:28
· 3 commits to main since this release

utf8-string is now tekst, a library for working with text by graphemes. Its grapheme boundaries now also work on a String or another CharSequence, at char indices, with no copy of the text.

  • isGraphemeBoundary, nextGraphemeBoundary and previousGraphemeBoundary extend CharSequence. startIndex and endIndex limit a query to a part of the text, such as one line, and the query reads no char outside it.
  • A loop over the graphemes takes linear time when each call passes the last boundary as startIndex.
  • Java calls them as CharSequenceGraphemes.nextGraphemeBoundary(text, index).

The dependency is now io.github.dmitrynekrasov:tekst, and the package is tekst, so import utf8string.u8 becomes import tekst.u8. The Gradle plugin keeps its id, io.github.dmitrynekrasov.utf8-string, but its 0.3.0 encodes the literals of tekst 0.3.0 only, so update both versions together.

implementation("io.github.dmitrynekrasov:tekst:0.3.0")

API reference: https://dmitrynekrasov.github.io/tekst/