Code example for StringCharacterIterator

Methods: getIndex

0
        assertEquals('f', fixture.first());
        fixture = new StringCharacterIterator("fixture", 1);
        assertEquals('f', fixture.first());
        fixture = new StringCharacterIterator("fixture", 1, "fixture".length(),
                2); 
        assertEquals('i', fixture.first());
 
        StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
                6, 4); 
        assertEquals("Wrong first char", 's', it1.first());
        assertEquals("Wrong next char", 't', it1.next());
        it1 = new StringCharacterIterator("testing", 2, 2, 2);
        assertTrue("Not DONE", it1.first() == CharacterIterator.DONE);
    } 
 
    /** 
     * @tests java.text.StringCharacterIterator.getBeginIndex() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "",