From: <dr...@us...> - 2002-11-10 21:11:30
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory usw-pr-cvs1:/tmp/cvs-serv11092/src/org/webmacro/servlet Modified Files: TextTool.java Log Message: - fixing bug #69: TextTool.rtim() trims too much added a testcase for it - added ability to run just one test: example: ant test -Dtest=TestTextTool Index: TextTool.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/TextTool.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TextTool.java 11 Jun 2002 17:43:22 -0000 1.9 --- TextTool.java 10 Nov 2002 21:11:27 -0000 1.10 *************** *** 108,112 **** * the value of <code>src</code>.<p> * ! * @returns String with all occurrences of <code>from</code> replaced with * <code>to</code> in <code>src</code> or <code>src</code> if * <code>from</code> not found --- 108,112 ---- * the value of <code>src</code>.<p> * ! * @return String with all occurrences of <code>from</code> replaced with * <code>to</code> in <code>src</code> or <code>src</code> if * <code>from</code> not found *************** *** 263,267 **** if (s == null) return null; for (int i = s.length() - 1; i > -1; i--) { ! if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i); } // if all WS return empty string --- 263,267 ---- if (s == null) return null; for (int i = s.length() - 1; i > -1; i--) { ! if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i+1); } // if all WS return empty string |