Package com.aptana.shared_core.string

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


    }

    public boolean writeNewLine(boolean force) throws IOException {
        if (force || lastState == LAST_STATE_WRITE) {
            FastStringBuffer buffer = writer.getBuffer();
            if (buffer.endsWith(": ")) {
                buffer.deleteLast();
            }

            if (lastState == LAST_STATE_NEW_LINE) {
                this.writeIndent();
View Full Code Here


        nextMustBeNewLine = false;
        if (lastState == LAST_STATE_NEW_LINE) {
            this.writeIndent();
        }
        FastStringBuffer buf = this.getBuffer();
        if (buf.endsWith("\r") || buf.endsWith("\n") || buf.endsWith(" ") || buf.endsWith("\t")) {
            writeRaw(StringUtils.leftTrim(o));

        } else {
            writeRaw(o);
        }
View Full Code Here

        nextMustBeNewLine = false;
        if (lastState == LAST_STATE_NEW_LINE) {
            this.writeIndent();
        }
        FastStringBuffer buf = this.getBuffer();
        if (buf.endsWith("\r") || buf.endsWith("\n") || buf.endsWith(" ") || buf.endsWith("\t")) {
            writeRaw(StringUtils.leftTrim(o));

        } else {
            writeRaw(o);
        }
View Full Code Here

        nextMustBeNewLine = false;
        if (lastState == LAST_STATE_NEW_LINE) {
            this.writeIndent();
        }
        FastStringBuffer buf = this.getBuffer();
        if (buf.endsWith("\r") || buf.endsWith("\n") || buf.endsWith(" ") || buf.endsWith("\t")) {
            writeRaw(StringUtils.leftTrim(o));

        } else {
            writeRaw(o);
        }
View Full Code Here

        nextMustBeNewLine = false;
        if (lastState == LAST_STATE_NEW_LINE) {
            this.writeIndent();
        }
        FastStringBuffer buf = this.getBuffer();
        if (buf.endsWith("\r") || buf.endsWith("\n") || buf.endsWith(" ") || buf.endsWith("\t")) {
            writeRaw(StringUtils.leftTrim(o));

        } else {
            writeRaw(o);
        }
View Full Code Here

                        return null;
                    }
                    sb.append(pyCode);
                    sb.append(", ");
                }
                if (sb.endsWith(", ")) {
                    sb.deleteLastChars(2); // get rid of last ", "
                }
                sb.append(")");
                return sb.toString();
            }
View Full Code Here

        assertEquals("cba", fastStringBuffer2.toString());
    }

    public void testEndsWith() throws Exception {
        FastStringBuffer fastStringBuffer = new FastStringBuffer("abc", 0);
        assertTrue(fastStringBuffer.endsWith("c"));
        assertTrue(fastStringBuffer.endsWith("bc"));
        assertTrue(fastStringBuffer.endsWith("abc"));
        assertTrue(!fastStringBuffer.endsWith("aabc"));

        assertTrue(fastStringBuffer.startsWith("abc"));
View Full Code Here

    }

    public void testEndsWith() throws Exception {
        FastStringBuffer fastStringBuffer = new FastStringBuffer("abc", 0);
        assertTrue(fastStringBuffer.endsWith("c"));
        assertTrue(fastStringBuffer.endsWith("bc"));
        assertTrue(fastStringBuffer.endsWith("abc"));
        assertTrue(!fastStringBuffer.endsWith("aabc"));

        assertTrue(fastStringBuffer.startsWith("abc"));
        assertTrue(fastStringBuffer.startsWith("a"));
View Full Code Here

    public void testEndsWith() throws Exception {
        FastStringBuffer fastStringBuffer = new FastStringBuffer("abc", 0);
        assertTrue(fastStringBuffer.endsWith("c"));
        assertTrue(fastStringBuffer.endsWith("bc"));
        assertTrue(fastStringBuffer.endsWith("abc"));
        assertTrue(!fastStringBuffer.endsWith("aabc"));

        assertTrue(fastStringBuffer.startsWith("abc"));
        assertTrue(fastStringBuffer.startsWith("a"));
        assertTrue(fastStringBuffer.startsWith("ab"));
View Full Code Here

    public void testEndsWith() throws Exception {
        FastStringBuffer fastStringBuffer = new FastStringBuffer("abc", 0);
        assertTrue(fastStringBuffer.endsWith("c"));
        assertTrue(fastStringBuffer.endsWith("bc"));
        assertTrue(fastStringBuffer.endsWith("abc"));
        assertTrue(!fastStringBuffer.endsWith("aabc"));

        assertTrue(fastStringBuffer.startsWith("abc"));
        assertTrue(fastStringBuffer.startsWith("a"));
        assertTrue(fastStringBuffer.startsWith("ab"));
        assertTrue(!fastStringBuffer.startsWith("abcd"));
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.