Skip to content

v0.1.0

Choose a tag to compare

@DmitryNekrasov DmitryNekrasov released this 03 Oct 12:40
· 33 commits to main since this release

The first release.

  • Utf8String, an immutable Kotlin Multiplatform string stored as UTF-8 bytes. Its length counts graphemes and for iterates over them, by the rules of Unicode 18.0 (UAX #29), with the same result on every target.
  • .u8 and toUtf8String() encode a String. With the compiler plugin, "...".u8 on a constant string is encoded at compile time.
  • Targets: JVM, JS, Wasm (JS and WASI), and Kotlin/Native for Linux, macOS arm64, Windows, iOS, watchOS, and tvOS.
  • The library needs Kotlin 2.4.20 or newer, and the compiler plugin works only with Kotlin 2.4.20.
implementation("io.github.dmitrynekrasov:utf8-string:0.1.0")

API reference: https://dmitrynekrasov.github.io/utf8-string/