Commit Graph

5350 Commits

Author SHA1 Message Date
Henri Yandell 5f0560cb60 Fixed Antony's name. He wrote the original escape() method.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137300 13f79535-47bb-0310-9956-ffa450edef68
2003-04-16 16:31:45 +00:00
Henri Yandell eb6a2942c0 Tenfold improvement in performance for leftPad, rightPad and repeat when repeat is over a String of length 1, by implementation of a padding method. The padding method is kept private for the moment.
Also a modification of containsOnly so it has a partner method indexOfAnyBut. Unit Test added for indexOfAnyBut.

Submitted by:	Robert Simpson


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137299 13f79535-47bb-0310-9956-ffa450edef68
2003-04-16 04:37:33 +00:00
Henri Yandell 92a9a68b72 Integrated WordWrapUtils testing in.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137298 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 14:29:01 +00:00
Henri Yandell fb2548b304 Return of WordWrapUtils, fresh with bugs fixed in StringTaglib. Part of the
reason for dropping it originally was that I knew my methods [wordWrap rather than wrapText or wrapLine] had nasty die-a-death bugs and hadn't had time to fix them. These got fixed as a part of String Taglib so I'm now personally happy with the code. As happy as you can ever be anyway without more tests to hurt it.

Submitted by:	Henning Schmiedehausen


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137297 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 14:28:41 +00:00
Martin van den Bemt 5dc5e3c0e9 Added eclipse files to ignorelist.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137296 13f79535-47bb-0310-9956-ffa450edef68
2003-04-14 11:37:59 +00:00
Gary D. Gregory b48f4effee Added myself to the list of committers.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137295 13f79535-47bb-0310-9956-ffa450edef68
2003-04-10 18:59:48 +00:00
Gary D. Gregory 408466f404 Remove unused imports (with agreement on shared clean up chores from Alex).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137294 13f79535-47bb-0310-9956-ffa450edef68
2003-04-10 00:01:21 +00:00
Alex Chaffee 49d5add385 improving javadoc
added apos entity to XML escape/unescape
add test for "unknown entity" behavior


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137293 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 21:30:18 +00:00
Alex Chaffee 69cc0e40e6 Extracted Entities class (instead of inner class)
Added support for full HTML 4.0 entity set
Separated XML, ISO8859-1 (HTML 3.2), and HTML 4.0 entities inside Entities object
Added escapeXml and unescapeXml public API methods
Escape now uses entities for values 0x80 or greater (previously 0x100)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137292 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 20:55:33 +00:00
Alex Chaffee 6af3b80369 Escaping unicode uses capital letters e.g. \uABCD
Found and fixed bug when unicode character is at the end of a string to unescape
Added unit tests for above bug to both StringUtilsTest and StringEscapeUtilsTest
StringUtils.[un]escape now call StringEscapeUtils.[un]escapeJava


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137291 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 18:45:29 +00:00
Alex Chaffee 2e862e0c47 make test strings 7-bit clean (bug 18836)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137290 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 17:30:29 +00:00
Henri Yandell 3ac32dd142 Patch for RandomString bug in which counts of 0 or negative counts would cause array exceptions.
Submitted by:	ville.skytta@iki.fi (Ville Skytt�)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137289 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 14:13:03 +00:00
Gary D. Gregory 082cde8df8 Clean up some Javadoc comments to remove warnings generated when Javadoc from Java 1.4.1 is used.
FYI, warnings like: This sentence is different from what will be interpreted as the first sentence in the
next major release (when that interpretation will be internationalized), which is: <snip/>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137288 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 01:08:30 +00:00
Gary D. Gregory e5c8e4a225 Fix some Javadoc {@link}s and clean up some Javadoc comments to remove warnings generated when Javadoc from Java 1.4.1 is used.
FYI, warnings like: This sentence is different from what will be interpreted as the first sentence in the
next major release (when that interpretation will be internationalized), which is: <snip/>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137287 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 01:04:48 +00:00
Gary D. Gregory f810dc3645 Clean up some Javadoc comments to remove warnings generated when Javadoc from Java 1.4.1 is used.
FYI, warnings like: This sentence is different from what will be interpreted as the first sentence in the
next major release (when that interpretation will be internationalized), which is: <snip/>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137286 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 00:07:50 +00:00
Gary D. Gregory ccde85985d Removed unused import.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137285 13f79535-47bb-0310-9956-ffa450edef68
2003-04-08 23:45:16 +00:00
Gary D. Gregory 6a1dc2997c Improve Javadoc (I hope!).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137284 13f79535-47bb-0310-9956-ffa450edef68
2003-04-08 22:36:04 +00:00
Gary D. Gregory e180daa748 Clean up some Javadoc comments to remove warnings generated when Javadoc from Java 1.4.1 is used.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137283 13f79535-47bb-0310-9956-ffa450edef68
2003-04-08 22:34:53 +00:00
Gary D. Gregory cdf3c5161e Fix a missing javadoc </code> end tag.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137282 13f79535-47bb-0310-9956-ffa450edef68
2003-04-08 20:44:10 +00:00
Henri Yandell 076ebc6d17 A Utils class that wraps java.lang.Math.random() and offers up methods
similar to that found on the java.util.Random class. Effectively this class
contains the methods that ought to be found on java.lang.Math.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137281 13f79535-47bb-0310-9956-ffa450edef68
2003-04-02 16:28:15 +00:00
Alex Chaffee 4e443f9cfc added some more entities from HTML 4.0 spec, refactored (Entities class), initialize maps on demand
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137280 13f79535-47bb-0310-9956-ffa450edef68
2003-04-02 06:14:46 +00:00
Henri Yandell 965077e483 Put myself in as author of escape/unescape and removed unused imports.
Really just to test eclipse/cvs on OS X.
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS:   If this change addresses a PR in the problem report tracking
CVS:   database, then enter the PR number(s) here.
CVS: Obtained from:
CVS:   If this change has been taken from another system, such as NCSA,
CVS:   then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS:   If this code has been contributed to Apache by someone else; i.e.,
CVS:   they sent us a patch or a new module, then include their name/email
CVS:   address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS:   If we are doing pre-commit code reviews and someone else has
CVS:   reviewed your changes, include their name(s) here.
CVS:   If you have not had it reviewed then delete this line.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137279 13f79535-47bb-0310-9956-ffa450edef68
2003-04-01 17:19:28 +00:00
Alex Chaffee 4b0aeca9f2 StringEscapeUtils: escape/unescape Java/JavaScript/HTML
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137278 13f79535-47bb-0310-9956-ffa450edef68
2003-03-31 03:53:52 +00:00
Alex Chaffee 5b83eb9358 changed chomp() to match Perl
deprecated chomp* methods in favor of new slice methods
improved unit tests and documentation


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137277 13f79535-47bb-0310-9956-ffa450edef68
2003-03-29 16:17:21 +00:00
Gary D. Gregory edb0e8d284 Fix bug 16676: StackOverflow due to ToStringBuilder
(http://issues.apache.org/bugzilla/show_bug.cgi?id=16676)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137276 13f79535-47bb-0310-9956-ffa450edef68
2003-03-27 08:55:22 +00:00
Stephen Colebourne ab7745f98e Deprecate clean() now trimToEmpty() is added
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137275 13f79535-47bb-0310-9956-ffa450edef68
2003-03-25 00:15:58 +00:00
Stephen Colebourne 67bdcb0f1a Add trimToNull
Add trimToEmpty


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137274 13f79535-47bb-0310-9956-ffa450edef68
2003-03-24 00:47:02 +00:00
Stephen Colebourne 3c1f752b2a Update containsOnly
Add containsNone


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137273 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 21:52:31 +00:00
Stephen Colebourne 3f8418c654 Update licence date to 2003
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137272 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 21:51:51 +00:00
Stephen Colebourne bdf11dfa91 Update licence date to 2003
Javadoc fixes


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137271 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 18:05:44 +00:00
Stephen Colebourne 637d681789 Update licence date to 2003
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137270 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 18:02:29 +00:00
Stephen Colebourne dd9f463d68 Remove reverseArray as reverse already exists!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137269 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 17:57:42 +00:00
Stephen Colebourne eb68e2a6f2 Update licence date to 2003
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137268 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 17:36:16 +00:00
Henri Yandell f64ecf1cd7 Added a CharSetUtils.keep method which is the reverse of the delete method.
In part, it fulfills the StringUtils.getNumerics(String) method that Bug
#13771 requests.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137267 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 05:50:51 +00:00
Henri Yandell 8e54ccc4be Bug 17882 submitted [by hand as the patch was out of date].
join and split now take chars as separators as well as Strings.

Submitted by:	Henning P. Schmiedehausen


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137266 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 05:26:23 +00:00
Henri Yandell ae7c590d59 Moved reverseArray method from a private method in StringUtils into ArrayUtils.
This method exists in Jakarta Collection, so is a duplicate, but it belongs in
ArrayUtils.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137265 13f79535-47bb-0310-9956-ffa450edef68
2003-03-23 04:58:47 +00:00
Gary D. Gregory 1a3ba6816d Remove unused variables in the testMixedArray method.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137264 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 05:41:23 +00:00
Gary D. Gregory 2ba51c13fb Apply patch for bug 17250 (http://issues.apache.org/bugzilla/show_bug.cgi?id=17250) with some additional minor improvements.
Added tests for reflection methods with array arguments.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137263 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 05:33:35 +00:00
Gary D. Gregory 4ecadc12ba Apply patch for bug 17250 (http://issues.apache.org/bugzilla/show_bug.cgi?id=17250) with some additional minor improvements.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137262 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 05:32:11 +00:00
Gary D. Gregory 804ccc397d Removed an unused import statement.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137261 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 02:50:42 +00:00
Henri Yandell 47fc18a02e Added a test case for isNestedThrowable
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137260 13f79535-47bb-0310-9956-ffa450edef68
2003-03-18 06:14:23 +00:00
Henri Yandell ff33134d11 Added getFullStackTrace and isNestedThrowable. Listed as Bug #16689
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137259 13f79535-47bb-0310-9956-ffa450edef68
2003-03-18 05:10:48 +00:00
Alex Chaffee a50e6215b2 Purpletech code import: abbreviate, difference, differenceAt
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137258 13f79535-47bb-0310-9956-ffa450edef68
2003-03-17 05:28:37 +00:00
Stephen Colebourne e8a0b41aa3 Remove unused import
from Gary Gregory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137257 13f79535-47bb-0310-9956-ffa450edef68
2003-03-06 22:50:21 +00:00
Stephen Colebourne 285f6016bc Remove erroneous abstract, Comparable and Serializable keywords
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137256 13f79535-47bb-0310-9956-ffa450edef68
2003-02-22 20:42:36 +00:00
Stephen Colebourne 5b89f3d89a Use more appropriate scoping for inner class
from Gary Gregory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137255 13f79535-47bb-0310-9956-ffa450edef68
2003-02-22 20:19:16 +00:00
Stephen Colebourne bb7e7e1708 Use default HashMap sizes as this is better across JDK versions
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137253 13f79535-47bb-0310-9956-ffa450edef68
2003-02-06 20:13:07 +00:00
Stephen Colebourne e6f11e0ea0 Fix javadoc from checkstyle
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137252 13f79535-47bb-0310-9956-ffa450edef68
2003-02-04 22:50:31 +00:00
Stephen Colebourne 2023467c05 Fix licences, dates and since tags
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137251 13f79535-47bb-0310-9956-ffa450edef68
2003-02-04 22:19:33 +00:00
Stephen Colebourne 751c151c49 Change scope of static constant for performance
from Gary Gregory, bug ref 16622


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137250 13f79535-47bb-0310-9956-ffa450edef68
2003-02-04 22:12:08 +00:00