code: public int spanBack(CharSequence s, int fromIndex, SpanCondition spanCondition) {
          if (fromIndex <= 0) {
              return 0;
          }
          if (fromIndex > s.length()) {
              fromIndex = s.length();
          }
          if (bmpSet != null) {
              // Frozen set without strings, or no string is relevant for spanBack().
              return bmpSet.spanBack(s, fromIndex, spanCondition);
          }
          if (stringSpan != null) {
              return stringSpan.spanBack(s, fromIndex, spanCondition);
          } else if (!strings.isEmpty()) {
              int which = (spanCondition == SpanCondition.NOT_CONTAINED)
                      ? UnicodeSetStringSpan.BACK_UTF16_NOT_CONTAINED
                              : UnicodeSetStringSpan.BACK_UTF16_CONTAINED;
              UnicodeSetStringSpan strSpan = new UnicodeSetStringSpan(this, new ArrayList<String>(strings), which);
              if (strSpan.needsStringSpanUTF16()) {
                  return strSpan.spanBack(s, fromIndex, spanCondition);
              }
          }
  
          // Pin to 0/1 values.
          boolean spanContained = (spanCondition != SpanCondition.NOT_CONTAINED);
  
          int c;
          int prev = fromIndex;
          do {
              c = Character.codePointBefore(s, prev);
              if (spanContained != contains(c)) {
                  break;
              }
              prev -= Character.charCount(c);
          } while (prev > 0);
          return prev;
      }
docs: Span a string backwards (from the fromIndex) using this UnicodeSet.
  If the fromIndex is less than 0, spanBack will return 0.
  If fromIndex is greater than the string length, spanBack will start from the string length.
  <p>To replace, count elements, or delete spans, see {@link android.icu.text.UnicodeSetSpanner UnicodeSetSpanner}.
  @param s The string to be spanned
  @param fromIndex The index of the char (exclusive) that the string should be spanned backwards
  @param spanCondition The span condition
  @return The string index which starts the span (i.e. inclusive).