I have a spannable string and I want to find the index of a substring in the spannable string, I don't want to convert it back to a string as the spannable string is already formatted.
Asked
Active
Viewed 483 times
1
-
You trying to find the index of Spanned substring or any substring? – skafle Oct 15 '21 at 10:49
1 Answers
2
TextUtils
has many variations of indexOf()
to find the index of CharSequence
in another CharSequence
. Both String
and SpannedString
are CharSequence
implementations.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491