1

我有一个可跨字符串,我想在可跨字符串中找到子字符串的索引,我不想将它转换回字符串,因为可跨字符串已经格式化。

4

1 回答 1

2

TextUtils has many variations of indexOf() to find the index of CharSequence in another CharSequence. Both String and SpannedString are CharSequence implementations.

于 2021-10-15T10:51:25.997 回答