
XID_Start and XID_Continue predicates for Unicode code points, enabling accurate identifier validation and token parsing across languages and tooling per Unicode Standard Annex #31.
Kotlin Multiplatform port of dtolnay/unicode-ident.
The upstream Rust crate exposes two predicates that determine whether a Unicode
code point belongs to the XID_Start or XID_Continue property classes
defined in Unicode Standard Annex #31,
which is the property set Rust (and most other modern languages) use to decide
which characters may begin or continue an identifier.
import io.github.kotlinmania.unicodeident.isXidStart
import io.github.kotlinmania.unicodeident.isXidContinueFor a full Rust char represented as an integer Unicode scalar, use
isXidStartCodePoint(Int) and isXidContinueCodePoint(Int). These use the same
tables, including supplementary planes. Invalid scalar values return false;
the existing Char entry points remain available.
This port is consumed by proc-macro2-kotlin
for identifier validation in the Fallback token-parser, mirroring the
unicode_ident::is_xid_start / unicode_ident::is_xid_continue calls in the
upstream Rust fallback.rs.
Kotlin Multiplatform: macOS ARM64; Linux x64/ARM64; Windows x64; iOS, tvOS, and watchOS ARM64 device and simulator targets; Android Native ARM64/x64; JS and Wasm-JS (browser + Node); Wasm-WASI; Android; and JVM.
Swift Export and its test harness require macOS 15 or newer. The Swift workflow uses the current template’s macOS 26 runner for its Xcode SDK.
./gradlew build
./gradlew testUpstream unicode-ident is (MIT OR Apache-2.0) AND Unicode-3.0. The same
combination applies to this port. License texts are mirrored from upstream as
LICENSE-APACHE, LICENSE-MIT, and
LICENSE-UNICODE.
Upstream README is preserved verbatim as README-UPSTREAM.md.
// build.gradle.kts
commonMain.dependencies {
implementation("io.github.kotlinmania:unicode-ident-kotlin:0.1.0")
}Kotlin Multiplatform port of dtolnay/unicode-ident.
The upstream Rust crate exposes two predicates that determine whether a Unicode
code point belongs to the XID_Start or XID_Continue property classes
defined in Unicode Standard Annex #31,
which is the property set Rust (and most other modern languages) use to decide
which characters may begin or continue an identifier.
import io.github.kotlinmania.unicodeident.isXidStart
import io.github.kotlinmania.unicodeident.isXidContinueFor a full Rust char represented as an integer Unicode scalar, use
isXidStartCodePoint(Int) and isXidContinueCodePoint(Int). These use the same
tables, including supplementary planes. Invalid scalar values return false;
the existing Char entry points remain available.
This port is consumed by proc-macro2-kotlin
for identifier validation in the Fallback token-parser, mirroring the
unicode_ident::is_xid_start / unicode_ident::is_xid_continue calls in the
upstream Rust fallback.rs.
Kotlin Multiplatform: macOS ARM64; Linux x64/ARM64; Windows x64; iOS, tvOS, and watchOS ARM64 device and simulator targets; Android Native ARM64/x64; JS and Wasm-JS (browser + Node); Wasm-WASI; Android; and JVM.
Swift Export and its test harness require macOS 15 or newer. The Swift workflow uses the current template’s macOS 26 runner for its Xcode SDK.
./gradlew build
./gradlew testUpstream unicode-ident is (MIT OR Apache-2.0) AND Unicode-3.0. The same
combination applies to this port. License texts are mirrored from upstream as
LICENSE-APACHE, LICENSE-MIT, and
LICENSE-UNICODE.
Upstream README is preserved verbatim as README-UPSTREAM.md.
// build.gradle.kts
commonMain.dependencies {
implementation("io.github.kotlinmania:unicode-ident-kotlin:0.1.0")
}