Skip to content

Latest commit

 

History

History
55 lines (44 loc) · 1.81 KB

README.md

File metadata and controls

55 lines (44 loc) · 1.81 KB

karacteristics

Licence Maven Central Version

The karacteristics library provides convenient extension properties to get characteristics for Unicode codepoints. The following characteristics are available:

The first two properties are generated using information from https://www.compart.com/en/unicode/ resource. The latter two are generated from the corresponding files.

Problem to solve

There is no way to get codepoint characteristics in Kotlin Multiplatform. The available API provides only category property for Char type. But this is no enough - some of the Unicode codepoints take more than 2 bytes (size of Char). Because of that, the existing API returns incorrect information for such codepoints.

Usage

Supported targets

Target
jvm
js
wasmJs
wasmWasi
macosX64
macosArm64
iosArm64
iosSimulatorArm64
linuxX64
linuxArm64
mingwX64

The library is published to Maven Central. To use it, just add a corresponding dependency to the common source set.

kotlin {
  sourceSets {
    commonMain {
      dependencies {
        implementation("io.github.optimumcode:karacteristics:0.0.3")
      }
    }
  }
}