Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 58910 invoked from network); 4 May 2004 20:55:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 May 2004 20:55:46 -0000 Received: (qmail 68600 invoked by uid 500); 4 May 2004 20:55:22 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 68540 invoked by uid 500); 4 May 2004 20:55:21 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 68421 invoked from network); 4 May 2004 20:55:20 -0000 Received: from unknown (HELO rwcrmhc11.comcast.net) (204.127.198.35) by daedalus.apache.org with SMTP; 4 May 2004 20:55:20 -0000 Received: from haskinferguson.net (h002078c8767f.ne.client2.attbi.com[24.34.179.231]) by comcast.net (rwcrmhc11) with SMTP id <2004050420552601300nv2lae>; Tue, 4 May 2004 20:55:26 +0000 Message-ID: <40980383.5040403@HaskinFerguson.net> Date: Tue, 04 May 2004 16:56:35 -0400 From: Denis Haskin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [lang] StringUtils.strip References: <409801DE.4010802@boscovs.com> In-Reply-To: <409801DE.4010802@boscovs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N From the javadoc you so conveniently linked to: "Strips any of a set of characters from the start and end of a String. " Note *start* and *end*. dwh Mike Zatko wrote: > I have a problem with the strip method: > > String number = "610-926-6598"; > String newNumber = StringUtils.strip(number, "-"); > System.out.println("newNumber: '" + newNumber + "'"); > > Output: > newNumber: '610-926-6598' > > According to the JavaDoc, this should strip out the hyphens but it > does not. A matter of fact I cannot get it to strip anything. > > http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/StringUtils.html#strip(java.lang.String,%20java.lang.String) > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org