Package com.aptana.shared_core.string

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


                        }
                        line.append(' ');
                        line.append(tuple.o2);
                        line.append(endLineDelim);
                        all.append(line);
                        line.clear();
                        firstInLine = true;
                    }
                }

                if (!firstInLine) {
View Full Code Here


                        addedParenForLine = false;
                        line.append(')');
                    }
                    line.append(endLineDelim);
                    all.append(line);
                    line.clear();
                }
            }

            writeImportsWithoutFrom(endLineDelim, all, importsWithoutFrom);
View Full Code Here

                                    j++;
                                    break;
                                }
                            }
                            String newSub = sub.substring(0, j);
                            strbuf.clear();
                            for (String line : lines) {
                                strbuf.append(newSub);
                                strbuf.append(line.substring(sub.length()));
                            }
View Full Code Here

                                        break;
                                    }
                                }
                                if (onlyWhitespaces) {
                                    String newSub = sub.substring(0, subLen - mod);
                                    strbuf.clear();
                                    for (String line : lines) {
                                        strbuf.append(newSub);
                                        strbuf.append(line.substring(sub.length()));
                                    }
                                }
View Full Code Here

                                break;
                            default:
                                throw new RuntimeException("Unexpected part in line: " + line);
                        }
                        part++;
                        buf.clear();
                    } else {
                        buf.append(c);
                    }
                }
View Full Code Here

                            //File also written.
                            key.key.file = new File(ObjectsPool.internLocal(objectsPoolMap, buf.toString()));
                            break;

                    }
                    buf.clear();
                }
            }
        }
    }
View Full Code Here

                String impStr = imp.toString();
                int endLine = line + com.aptana.shared_core.string.StringUtils.countLineBreaks(impStr);
                found = new ImportHandleInfo(impStr, line, endLine, startedInMiddle);
                this.importInfo.add(found);
                line = endLine;
                imp = imp.clear();
                startedInMiddle = true;
            } else {
                if (c == '\r' || c == '\n') {
                    startedInMiddle = false;
                }
View Full Code Here

            FastStringBuffer alias = new FastStringBuffer();
            FastStringBuffer comments = new FastStringBuffer();
            for (int i = 0; i < importedStr.length(); i++) {
                char c = importedStr.charAt(i);
                if (c == '#') {
                    comments = comments.clear();
                    i = ParsingUtils.create(importedStr).eatComments(comments, i);
                    addImportAlias(lst, importComments, alias, comments.toString());
                    alias = alias.clear();

                } else if (c == ',' || c == '\r' || c == '\n') {
View Full Code Here

        FastStringBuffer fastString = new FastStringBuffer(2);
        fastString.append("bbb");
        assertEquals("bbb", fastString.toString());
        fastString.append("ccc");
        assertEquals("bbbccc", fastString.toString());
        fastString.clear();
        assertEquals("", fastString.toString());
        fastString.append("abc");
        assertEquals("abc", fastString.toString());
        fastString.reverse();
        assertEquals("cba", fastString.toString());
View Full Code Here

        fastString.append("abc");
        assertEquals("abc", fastString.toString());
        fastString.reverse();
        assertEquals("cba", fastString.toString());

        fastString.clear();
        fastString.append("aaa");
        FastStringBuffer other = new FastStringBuffer(3);
        other.append("bbcccdddddddddddddddddddddddddddddd");
        fastString.append(other);
        assertEquals("aaabbcccdddddddddddddddddddddddddddddd", fastString.toString());
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.