ide/src/wombat/gui/text/SchemeDocument.java
private int indexOf(String content, String needle, int offset) {
        int index;

        while ((index = content.indexOf(needle, offset)) != -1) {
            String text = getLine(content, index).trim();

            if (text.startsWith(needle) || text.endsWith(needle))
                break;
            else
                offset = index + 1;
        }

        return index;
    }
/*
    *  Assume the needle will the found at the start/end of the line
    */
Assume the needle will the found at the start/end of the line
Assume the needle will the found at the start / end of the line
private int indexOf(String content, String needle, int offset) {
        int index;
        while ((index = content.indexOf(needle, offset)) != -1) {
            String text = getLine(content, index).trim();
            if (text.startsWith(needle) || text.endsWith(needle))
                break;
            else
                offset = index + 1;
        }
        return index;
    }
private int indexOf ( String content , String needle , int offset ) { int index ; while ( ( index = content . indexOf ( needle , offset ) ) != - 1 ) { String text = getLine ( content , index ) . trim ( ) ; if ( text . startsWith ( needle ) || text . endsWith ( needle ) ) break ; else offset = index + 1 ; } return index ; }
Assume the needle will the found at the start/end of the line
Assume the needle will the found at the start / end of the line