commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Hudak" <charles.hu...@cardionet.com>
Subject RE: [lang] StringUtils.strip
Date Tue, 04 May 2004 21:03:08 GMT
<sigh> That's just silly that the method would ignore an empty string
for the replace characters.

It looks like StringUtils.replaceChars("abc", "b", "") = "ac" would
work.

-----Original Message-----
From: Denis Haskin [mailto:Denis@HaskinFerguson.net] 
Sent: Tuesday, May 04, 2004 1:59 PM
To: Jakarta Commons Users List
Subject: Re: [lang] StringUtils.strip


I haven't tried it, but according to the examples in the javadoc, 
replace() won't do it either:

StringUtils.replace("aba", "a", "")    = "aba"

dwh


Charles Hudak wrote:

>...You probably want to do this:
>
>StringUtils.replace(number, "-", "");
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message