Hitanshu Dhawan
01/11/2020, 7:57 AMtext_view.text = "Hello { `SpannableStringParser` < text-color:#0000FF ; text-decoration:underline|strike-through /> }".spannify()
This way there is no need to deal with indexes of String.
Also this String can come from back-end so that changing the styles of text doesn't require any front-end change.
https://github.com/hitanshu-dhawan/SpannableStringParser
Do check it out, and let me know what do you think 🙂