text

The lib.text module provides the foundation for multiplatform marker-aware text processing, regex processing, normalization, and UnicodeSet functionality, all of which are heavily used in the core model and runtime processing.

The module's main purpose is to be packaged in core and used only transitively through the core model and runtime. However, lib.text it can also be used as a standalone dependency for keyboard3-related text processing, without the need to parse a full keyboard3 file.

For error reporting, we plan to migrate this module to Kotlin rich errors once they are released. As of now, there are a lot of manually declared union interfaces, which already mimic the behavior of rich errors, but do not provide future source nor binary compatibility. Classes and functions planned for migration to rich errors are annotated with @WillRequireMigrationToRichErrors and require opt-in into this behavior.

Packages

Link copied to clipboard
common

Provides the baseline implementation for keyboard3 markers, marker-aware character strings, descriptors, and parsing facilities.

Link copied to clipboard
common

Multiplatform marker-aware search&replace regex, to enable regex-based transform rules.

Link copied to clipboard
common

Provides marker-aware string normalization and Unicode data files.

Link copied to clipboard
common

Provides a keyboard3-specific UnicodeSet implementation and parser facilities.

Link copied to clipboard
common

Provides abstraction for variable resolving, without requiring a model.