compat/src/main/java/androidx/core/text/BidiFormatter.java
private byte skipTagBackward() {
            int initialCharIndex = charIndex;
            while (charIndex > 0) {
                lastChar = text.charAt(--charIndex);
                if (lastChar == '<') {
                    // The start of the tag.
                    return Character.DIRECTIONALITY_WHITESPACE;
                }
                if (lastChar == '>') {
                    break;
                }
                if (lastChar == '"' || lastChar == '\'') {
                    // Skip over a quoted attribute value inside the tag.
                    char quote = lastChar;
                    while (charIndex > 0 && (lastChar = text.charAt(--charIndex)) != quote) {}
                }
            }
            // The original '>' wasn't the end of a tag after all.
            charIndex = initialCharIndex;
            lastChar = '>';
            return Character.DIRECTIONALITY_OTHER_NEUTRALS;
        }
/**
         * Advances charIndex backward through an HTML tag (after the closing &gt; has already been
         * read) and returns Character.DIRECTIONALITY_WHITESPACE. If there is no matching &lt;, does
         * not change charIndex and returns Character.DIRECTIONALITY_OTHER_NEUTRALS (for the &gt;
         * that hadn't been part of a tag after all). Nevertheless, the running time for calling
         * skipTagBackward() in a loop remains linear in the size of the text, even for a text like
         * "&gt;&gt;&gt;&gt;", because skipTagBackward() also stops looking for a matching &lt;
         * when it encounters another &gt;.
         */
Advances charIndex backward through an HTML tag (after the closing > has already been
read) and returns Character.DIRECTIONALITY_WHITESPACE. If there is no matching <, does
not change charIndex and returns Character.DIRECTIONALITY_OTHER_NEUTRALS (for the >
that hadn't been part of a tag after all).
Advances charIndex backward through an HTML tag ( after the closing > has already been read ) and returns Character . DIRECTIONALITY_WHITESPACE . If there is no matching < does not change charIndex and returns Character . DIRECTIONALITY_OTHER_NEUTRALS ( for the > that hadn ' t been part of a tag after all ) .
private byte skipTagBackward() {
            int initialCharIndex = charIndex;
            while (charIndex > 0) {
                lastChar = text.charAt(--charIndex);
                if (lastChar == '<') {
                    return Character.DIRECTIONALITY_WHITESPACE;
                }
                if (lastChar == '>') {
                    break;
                }
                if (lastChar == '"' || lastChar == '\'') {
                    char quote = lastChar;
                    while (charIndex > 0 && (lastChar = text.charAt(--charIndex)) != quote) {}
                }
            }
            charIndex = initialCharIndex;
            lastChar = '>';
            return Character.DIRECTIONALITY_OTHER_NEUTRALS;
        }
private byte skipTagBackward ( ) { int initialCharIndex = charIndex ; while ( charIndex > 0 ) { lastChar = text . charAt ( -- charIndex ) ; if ( lastChar == '<' ) { return Character . DIRECTIONALITY_WHITESPACE ; } if ( lastChar == '>' ) { break ; } if ( lastChar == '"' || lastChar == '\'' ) { char quote = lastChar ; while ( charIndex > 0 && ( lastChar = text . charAt ( -- charIndex ) ) != quote ) { } } } charIndex = initialCharIndex ; lastChar = '>' ; return Character . DIRECTIONALITY_OTHER_NEUTRALS ; }
Advances charIndex backward through an HTML tag (after the closing &gt; has already been
 read) and returns Character.DIRECTIONALITY_WHITESPACE.
Advances charIndex backward through an HTML tag ( after the closing &gt ; has already been read ) and returns Character . DIRECTIONALITY_WHITESPACE .
// The start of the tag. // Skip over a quoted attribute value inside the tag. // The original '>' wasn't the end of a tag after all.