Code example for StringCharacterIterator

Methods: current, getIndex, next

0
                2); 
        assertEquals("fixture".length(), fixture.getEndIndex());
        fixture = new StringCharacterIterator("fixture", 1, 4, 2);
        assertEquals(4, fixture.getEndIndex());
 
        StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
                6, 4); 
        assertEquals("Wrong end index 6", 6, it1.getEndIndex());
    } 
 
    /** 
     * @tests java.text.StringCharacterIterator.getIndex() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "getIndex", 
        args = {} 
    ) 
    public void testGetIndex() { 
        StringCharacterIterator fixture = new StringCharacterIterator("fixture");