spyglass/src/main/java/com/linkedin/android/spyglass/ui/MentionsEditText.java
private void removeTextWithinDeleteSpans(@NonNull Editable text) {
        DeleteSpan[] deleteSpans = text.getSpans(0, text.length(), DeleteSpan.class);
        for (DeleteSpan span : deleteSpans) {
            int spanStart = text.getSpanStart(span);
            int spanEnd = text.getSpanEnd(span);
            text.replace(spanStart, spanEnd, "");
            text.removeSpan(span);
        }
    }
private void removeTextWithinDeleteSpans(@NonNull Editable text) {
        DeleteSpan[] deleteSpans = text.getSpans(0, text.length(), DeleteSpan.class);
        for (DeleteSpan span : deleteSpans) {
            int spanStart = text.getSpanStart(span);
            int spanEnd = text.getSpanEnd(span);
            text.replace(spanStart, spanEnd, "");
            text.removeSpan(span);
        }
    }
Removes any {@link com.linkedin.android.spyglass.ui.MentionsEditText.DeleteSpan}s and the text within them from
the given text.

@param text the editable containing DeleteSpans to remove