commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [PATCH][LANG] StringUtils.trimNull(String)
Date Wed, 22 Jan 2003 22:06:20 GMT

Which is StringUtils.trim. Already there.

Like Dave, I'm not sure I can see converting "" to null as a highly common
thing to do. In fact, I'd expect people to want the reverse more often
[which I suspect Dave might like}, convert any null passed in into "".

Which is StringUtils.trim(StringUtils.defaultString(..)) or some such. A
bit longwinded.

Hen

On Wed, 22 Jan 2003 Dave.Derry@Equifax.com wrote:

>
> Hi,
>
> I'm just a lurker here, but my preference would be to return an empty
> string rather than null when the string consists of just whitespace. I find
> it to be annoying to always have to check for null. In fact, I very rarely
> initialize a String to null, but generally initialize to "".
>
> Just my 2 cents,
> Dave Derry
>
>
>
>
>
>                       "Leonardo
>                       Quijano                  To:      <commons-dev@jakarta.apache.org>
>                       Vincenzi"                cc:
>                       <lquijano@pnudcr         Subject: [PATCH][LANG] StringUtils.trimNull(String)
>                       .com>
>
>                       01/22/2003 01:38
>                       PM
>                       Please respond
>                       to "Jakarta
>                       Commons
>                       Developers List"
>
>
>
>
>
> I added a new method to StringUtils. It trims a string, returning null if
> the string only has whitespace.
>
> Bug#: 13367
>
> Leonardo Quijano
> lquijano@hotpop.com
> (See attached file: patchfile.txt)--
> To unsubscribe, e-mail:   <
> mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:commons-dev-help@jakarta.apache.org>
>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message