Code example for StringCharacterIterator

Methods: getBeginIndex, getEndIndex, getIndex, setText

0
        } 
 
        StringCharacterIterator it = new StringCharacterIterator("testing");
        assertEquals("Wrong begin index", 0, it.getBeginIndex());
        assertEquals("Wrong end index", 7, it.getEndIndex());
        assertEquals("Wrong current index", 0, it.getIndex());
        assertEquals("Wrong current char", 't', it.current());
        assertEquals("Wrong next char", 'e', it.next());
    } 
 
    /** 
     * @tests java.text.StringCharacterIterator#StringCharacterIterator(java.lang.String, 
     *        int) 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "StringCharacterIterator", 
        args = {java.lang.String.class, int.class}
    ) 
    public void test_ConstructorLjava_lang_StringI() {