commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Haskin <De...@HaskinFerguson.net>
Subject Re: [lang] StringUtils.strip
Date Tue, 04 May 2004 21:10:02 GMT
And in fact you don't need StringUtils at all (>JDK 1.4):

   String s = "781-555-1212";
   String s2 = s.replaceAll("-", "");

dwh


Charles Hudak wrote:

><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.
>  
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message