1

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.

a_local_nobody
  • 7,947
  • 5
  • 29
  • 51
Tamzid
  • 47
  • 6

1 Answers1

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