Package br.msf.commons.lang

Examples of br.msf.commons.lang.EnhancedStringBuilder.clear()


                builder.replace(match, " ");
            }
        }
        builder.replacePattern(" +", " ");
        final Collection<String> lines = builder.split("\n");
        builder.clear().appendln(commentStart);
        int max = maxLineLengh - leading.length();
        for (CharSequence line : lines) {
            if (line.length() <= max) {
                // short line, just append the leading txt and the line itself
                builder.append(leading).appendln(line);
View Full Code Here


                // remove the just added subline
                builder.delete(0, mark);
            } else {
                // it must be a super dupper mega word with no space! dont break it!
                lines.add(builder.trim().toString());
                builder.clear();
            }
        }
        if (builder.isNotBlank()) {
            // if there is some left-over on the buffer, we create the last subline with it.
            lines.add(builder.trim().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.