Package org.apache.abdera.i18n.text

Examples of org.apache.abdera.i18n.text.Codepoint


        CharUtils.append(buf, 0x10000);
        assertEquals(2, buf.length());
        assertEquals(CharUtils.getHighSurrogate(0x10000), buf.charAt(0));
        assertEquals(CharUtils.getLowSurrogate(0x10000), buf.charAt(1));
        assertTrue(CharUtils.isSurrogatePair(buf.charAt(0), buf.charAt(1)));
        Codepoint codepoint = CharUtils.codepointAt(buf, 0);
        assertEquals(0x10000, codepoint.getValue());
        assertEquals(2, codepoint.getCharCount());
        assertTrue(codepoint.isSupplementary());
        CharUtils.insert(buf, 0, codepoint.next());
        assertEquals(4, buf.length());
        assertEquals(CharUtils.codepointAt(buf, 0), codepoint.next());
    }
View Full Code Here


    CharUtils.append(buf, 0x10000);
    assertEquals(buf.length(),2);
    assertEquals(buf.charAt(0), CharUtils.getHighSurrogate(0x10000));
    assertEquals(buf.charAt(1), CharUtils.getLowSurrogate(0x10000));
    assertTrue(CharUtils.isSurrogatePair(buf.charAt(0), buf.charAt(1)));
    Codepoint codepoint = CharUtils.codepointAt(buf, 0);
    assertEquals(codepoint.getValue(),0x10000);
    assertEquals(codepoint.getCharCount(),2);
    assertTrue(codepoint.isSupplementary());
    CharUtils.insert(buf, 0, codepoint.next());
    assertEquals(buf.length(),4);
    assertEquals(codepoint.next(),CharUtils.codepointAt(buf, 0));
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.i18n.text.Codepoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.