JchuGroupedVisualTransformation

class JchuGroupedVisualTransformation(groupSize: Int = 4, separator: String = "-") : VisualTransformation

Visually separates text into fixed-size groups without changing the source value.

This is useful for codes, identifiers and card-like values where separators should remain presentation-only. Cursor offsets are preserved for separators of any length.

Parameters

groupSize

number of source characters in each group.

separator

text inserted between groups.

Constructors

Link copied to clipboard
constructor(groupSize: Int = 4, separator: String = "-")

Functions

Link copied to clipboard
open override fun filter(text: AnnotatedString): TransformedText