AnnotatedStringBuilder
Builder for creating AnnotatedString instances with styled text.
This is a top-level class (rather than nested inside AnnotatedString) to allow actual typealias AnnotatedString = PlatformAnnotatedString on Compose UI platforms, working around a Kotlin limitation where nested classes of expect classes cannot be resolved through typealiases from consuming modules.
Corresponds to androidx.compose.ui.text.AnnotatedString.Builder.
Builder for AnnotatedString.
Uses a tree of AnnotatedString.Nodes where withStyle pushes/pops node levels, mapping 1:1 to nested HTML <span> tags in the rendered output.
Constructors
Create an AnnotatedStringBuilder instance using the given String.
Create an AnnotatedStringBuilder instance using the given AnnotatedString.
Create an AnnotatedStringBuilder instance using the given String.
Create an AnnotatedStringBuilder instance using the given AnnotatedString.