Code example for AttributedString

Methods: addAttribute

0
    public void test_getRunLimitLAttribute() { 
        AttributedString as = new AttributedString("");
        assertEquals(0, as.getIterator().getRunLimit(
                AttributedCharacterIterator.Attribute.LANGUAGE));
 
        as = new AttributedString("text");
        as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE,
                "ENGLISH"); 
 
        as.addAttribute(AttributedCharacterIterator.Attribute.READING,
        "READ", 1, 3); 
 
        assertEquals(4, as.getIterator().getRunLimit(
                AttributedCharacterIterator.Attribute.LANGUAGE));
 
        assertEquals(1, as.getIterator().getRunLimit(
                AttributedCharacterIterator.Attribute.READING));
    } 
 
    public void test_getRunStart() { 
Connect your IDE to all the code out there  Get Codota for Java