Package com.aptana.shared_core.string

Examples of com.aptana.shared_core.string.FastStringBuffer.startsWith()


        assertTrue(fastStringBuffer.startsWith("a"));
        assertTrue(fastStringBuffer.startsWith("ab"));
        assertTrue(!fastStringBuffer.startsWith("abcd"));

        fastStringBuffer.setCharAt(0, 'h');
        assertTrue(fastStringBuffer.startsWith("hb"));
    }

    public void testReplace() throws Exception {
        assertEquals("def", new FastStringBuffer("abcdefabc", 0).replaceAll("abc", "").toString());
        assertEquals("xyzdef", new FastStringBuffer("abcdef", 0).replaceAll("abc", "xyz").toString());
View Full Code Here


        assertEquals("   aaabbbbbb", buf.appendN("bb", 3).toString());
    }

    public void testStartsWith() throws Exception {
        FastStringBuffer buf = new FastStringBuffer(0);
        assertFalse(buf.startsWith('"'));
        buf.append("a");
        assertFalse(buf.startsWith('"'));
        assertTrue(buf.startsWith('a'));
        buf.deleteFirst();
        assertFalse(buf.startsWith('"'));
View Full Code Here

    public void testStartsWith() throws Exception {
        FastStringBuffer buf = new FastStringBuffer(0);
        assertFalse(buf.startsWith('"'));
        buf.append("a");
        assertFalse(buf.startsWith('"'));
        assertTrue(buf.startsWith('a'));
        buf.deleteFirst();
        assertFalse(buf.startsWith('"'));
        assertFalse(buf.startsWith('a'));
    }
View Full Code Here

    public void testStartsWith() throws Exception {
        FastStringBuffer buf = new FastStringBuffer(0);
        assertFalse(buf.startsWith('"'));
        buf.append("a");
        assertFalse(buf.startsWith('"'));
        assertTrue(buf.startsWith('a'));
        buf.deleteFirst();
        assertFalse(buf.startsWith('"'));
        assertFalse(buf.startsWith('a'));
    }
View Full Code Here

        assertFalse(buf.startsWith('"'));
        buf.append("a");
        assertFalse(buf.startsWith('"'));
        assertTrue(buf.startsWith('a'));
        buf.deleteFirst();
        assertFalse(buf.startsWith('"'));
        assertFalse(buf.startsWith('a'));
    }

    public void testEndsWithChar() throws Exception {
        FastStringBuffer buf = new FastStringBuffer(0);
View Full Code Here

        buf.append("a");
        assertFalse(buf.startsWith('"'));
        assertTrue(buf.startsWith('a'));
        buf.deleteFirst();
        assertFalse(buf.startsWith('"'));
        assertFalse(buf.startsWith('a'));
    }

    public void testEndsWithChar() throws Exception {
        FastStringBuffer buf = new FastStringBuffer(0);
        assertFalse(buf.endsWith('"'));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.