getAnnotatedName

fun getAnnotatedName(searchedText: String, nonMatchingSpanStyle: SpanStyle, matchingSpanStyle: SpanStyle): LbcTextSpec.Annotated

Returns an LbcTextSpec.Annotated representation of the country's name, with parts of the name matching the searchedText highlighted using the provided matchingSpanStyle.

The search is case-insensitive and uses Unicode normalization (NFD form) for accurate matching.

Return

An LbcTextSpec.Annotated containing the formatted country name.

Parameters

searchedText

The text to search for within the country's name.

nonMatchingSpanStyle

The SpanStyle to apply to parts of the name that do not match the searchedText.

matchingSpanStyle

The SpanStyle to apply to parts of the name that match the searchedText.