[Pydev-cvs] org.python.pydev.core/src/org/python/pydev/core/docutils ParsingUtils.java, 1.20, 1.21
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-06-23 01:18:18
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/docutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26156/src/org/python/pydev/core/docutils Modified Files: ParsingUtils.java StringUtils.java Log Message: Minors Index: ParsingUtils.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/docutils/ParsingUtils.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ParsingUtils.java 15 Jun 2008 16:45:20 -0000 1.20 --- ParsingUtils.java 23 Jun 2008 01:18:25 -0000 1.21 *************** *** 48,55 **** i++; } ! if(i < len(cs)) if(buf != null){ buf.append(charAt(cs,i)); } return i; --- 48,57 ---- i++; } ! ! if(i < len(cs)){ if(buf != null){ buf.append(charAt(cs,i)); } + } return i; Index: StringUtils.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/docutils/StringUtils.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** StringUtils.java 18 May 2008 20:02:26 -0000 1.14 --- StringUtils.java 23 Jun 2008 01:18:25 -0000 1.15 *************** *** 13,16 **** --- 13,18 ---- import javax.swing.text.html.HTMLEditorKit; + import org.python.pydev.core.structure.FastStringBuffer; + public class StringUtils { *************** *** 23,27 **** */ public static String format(String str, Object... args) { ! StringBuffer buffer = new StringBuffer(); int j = 0; --- 25,29 ---- */ public static String format(String str, Object... args) { ! FastStringBuffer buffer = new FastStringBuffer(str.length()+(16*args.length)); int j = 0; *************** *** 31,35 **** char nextC = str.charAt(i + 1); if (nextC == 's') { ! buffer.append(args[j]); j++; i++; --- 33,37 ---- char nextC = str.charAt(i + 1); if (nextC == 's') { ! buffer.append(args[j].toString()); j++; i++; *************** *** 196,200 **** char c; ! StringBuffer buf = new StringBuffer(); for (int i = 0; i < len; i++) { --- 198,202 ---- char c; ! FastStringBuffer buf = new FastStringBuffer(); for (int i = 0; i < len; i++) { *************** *** 209,217 **** } ret.add(buf.toString()); ! buf = new StringBuffer(); } if (c == '\n') { ret.add(buf.toString()); ! buf = new StringBuffer(); } --- 211,219 ---- } ret.add(buf.toString()); ! buf.clear(); } if (c == '\n') { ret.add(buf.toString()); ! buf.clear(); } *************** *** 234,238 **** public static String replaceAll(String string, String replace, String with) { ! StringBuffer ret = new StringBuffer(); int len = string.length(); int replaceLen = replace.length(); --- 236,240 ---- public static String replaceAll(String string, String replace, String with) { ! FastStringBuffer ret = new FastStringBuffer(); int len = string.length(); int replaceLen = replace.length(); *************** *** 256,260 **** public static String removeWhitespaceColumnsToLeft(String hoverInfo) { ! StringBuffer buf = new StringBuffer(); int firstCharPosition = Integer.MAX_VALUE; --- 258,262 ---- public static String removeWhitespaceColumnsToLeft(String hoverInfo) { ! FastStringBuffer buf = new FastStringBuffer(); int firstCharPosition = Integer.MAX_VALUE; |