https://github.com/iseki0/ktunstrnorm
Lightweight Unicode normalization for Kotlin Multiplatform. Uses system APIs (like ICU, Java Normalizer, JS normalize) with zero bundled data.
https://github.com/iseki0/ktunstrnorm
kotlin kotlin-multiplatform unicode unicode-normalization
Last synced: 10 months ago
JSON representation
Lightweight Unicode normalization for Kotlin Multiplatform. Uses system APIs (like ICU, Java Normalizer, JS normalize) with zero bundled data.
- Host: GitHub
- URL: https://github.com/iseki0/ktunstrnorm
- Owner: iseki0
- License: mit
- Created: 2025-03-29T10:32:22.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-09T19:58:24.000Z (about 1 year ago)
- Last Synced: 2025-08-03T12:37:21.065Z (11 months ago)
- Topics: kotlin, kotlin-multiplatform, unicode, unicode-normalization
- Language: Kotlin
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ktunstrnorm
Unicode normalization function in Kotlin/Multiplatform, use platform APIs.
## Supported targets
- Kotlin/JVM
- Kotlin/JavaScript
- Kotlin/WasmJs
- Kotlin/Native
- macosX64 —Tier 1
- macosArm64
- iosSimulatorArm64
- iosX64
- iosArm64
- linuxX64 —Tier 2
- linuxArm64
- watchosArm32
- watchosArm64
- watchosX64
- watchosSimulatorArm64
- tvosSimulatorArm64
- tvosX64
- tvosArm64
- androidNativeArm32 —Tier 3
- androidNativeArm64
- androidNativeX64
- androidNativeX86
- mingwX64
- watchosDeviceArm64
## Samples
```kotlin
fun main() {
val input = "\u0065\u0301" // e + ́ = U+0065 U+0301
val expected = "\u00E9" // é = U+00E9
val result = input.normalize(NormalizationForm.NFC)
println(result)
check(expected == result)
}
```