public MentionsEditable trim() {
        // Delete beginning spaces
        while (length() > 0 && Character.isWhitespace(charAt(0))) {
            delete(0, 1);
        }
        // Delete ending spaces
        int len = length();
        while (len > 0 && Character.isWhitespace(charAt(len - 1))) {
            delete(len - 1, len);
            len--;
        }
        return new MentionsEditable(this, 0, length());
    }
public MentionsEditable trim() {
        
        while (length() > 0 && Character.isWhitespace(charAt(0))) {
            delete(0, 1);
        }
        
        int len = length();
        while (len > 0 && Character.isWhitespace(charAt(len - 1))) {
            delete(len - 1, len);
            len--;
        }
        return new MentionsEditable(this, 0, length());
    }
public MentionsEditable trim ( ) { // Delete beginning spaces while ( length ( ) > 0 && Character . isWhitespace ( charAt ( 0 ) ) ) { delete ( 0 , 1 ) ; } // Delete ending spaces int len = length ( ) ; while ( len > 0 && Character . isWhitespace ( charAt ( len - 1 ) ) ) { delete ( len - 1 , len ) ; len -- ; } return new MentionsEditable ( this , 0 , length ( ) ) ; }
Implementation of {@link String#trim()} for an {@link Editable}.

@return a new {@link MentionsEditable} with whitespace characters removed from the beginning and the end
Implementation of { @link String#trim () } for an { @link Editable } .