Failed to check if SpannedString contains certain character in Android

17 views Asked by At

I have html content string that is converted to Spanned using Html.fromHtml(this, Html.FROM_HTML_MODE_COMPACT). I want to check if it contains bullet point character "•" using both htmlValue.contains("•") and htmlValue.contains(Regex("•")). None of them works.

But when i try to replace that character using htmlValue.replace(Regex("•"), ""), it works. Why did that happens and how do i determine if SpannedString contains certains character?

0

There are 0 answers