Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 285D94100 for ; Thu, 2 Jun 2011 14:53:22 +0000 (UTC) Received: (qmail 74132 invoked by uid 500); 2 Jun 2011 14:53:21 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 74005 invoked by uid 500); 2 Jun 2011 14:53:21 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 73995 invoked by uid 99); 2 Jun 2011 14:53:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2011 14:53:21 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garydgregory@gmail.com designates 209.85.161.43 as permitted sender) Received: from [209.85.161.43] (HELO mail-fx0-f43.google.com) (209.85.161.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2011 14:53:15 +0000 Received: by fxm3 with SMTP id 3so824213fxm.30 for ; Thu, 02 Jun 2011 07:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ahvBR1/UA1L066u9oyOMSpvK4mReUj/7B+Gjys1t3SQ=; b=Qof5tuKL/HDgaAPUu8rldRYbJvlMamK/s07SeUgD+vgZ162uR44DgYo0JZ0RXvB7KL e6NqzuROOp8y1MumdGmXrTiTe6cv5H8jVTvEkch0o3xVr1CNz7XRPMna3dNzO7rxvRX7 BqdAikvHkyw0rsVZ04ouUMlGbu37rcXOEAPPU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ptigEWyB7v+Yh1vvG+xdfqO1y4skfeY+s3GqL9jb+DRkrVDxQvxUHcv3/jneVW/1pr 9FfL5mQGzCBfUCF9tppkHwwWO4NWdytOVc5DJzmD0/lcqM4wA+JWOtAueJ3wl/1dUO3t bagkVWcE/dtkhvvUAAwpIjvIvawwe14ag6GtY= MIME-Version: 1.0 Received: by 10.223.54.148 with SMTP id q20mr918508fag.84.1307026375484; Thu, 02 Jun 2011 07:52:55 -0700 (PDT) Received: by 10.223.113.146 with HTTP; Thu, 2 Jun 2011 07:52:55 -0700 (PDT) In-Reply-To: References: <-3806504398009589968@unknownmsgid> Date: Thu, 2 Jun 2011 10:52:55 -0400 Message-ID: Subject: Re: [LANG] support for k, M suffices when parsing numbers From: Gary Gregory To: Commons Developers List Cc: gudnabrsam@gmail.com Content-Type: multipart/alternative; boundary=001517479616d2a57a04a4bbcaa3 X-Virus-Checked: Checked by ClamAV on apache.org --001517479616d2a57a04a4bbcaa3 Content-Type: text/plain; charset=UTF-8 On Thu, Jun 2, 2011 at 10:50 AM, James Carman wrote: > On Thu, Jun 2, 2011 at 10:31 AM, Matt Benson wrote: > > FWIW, this type of code lives in Ant as long > > org.apache.tools.ant.util.StringUtils#parseHumanSizes(String). IMO it > > would be fine to copy/adapt this method into lang3 in perhaps > > StringUtils or NumberUtils. No harm in creating MemUtils as James > > suggested, but unless we can think of other things to go there I don't > > know if it can be justified. > > > > I would also suggest a method that takes a long and spits out a string > with the biggest denomination (kb, mb, gb, etc.) it can find to > display it. > > If it doesn't go in its own class, where else would you put it? > Perhaps StringUtils or NumberUtils? Maybe even SystemUtils, since > there are memory-related methods in System? > I like MemUtils so far. Gary > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > -- Thank you, Gary http://garygregory.wordpress.com/ http://garygregory.com/ http://people.apache.org/~ggregory/ http://twitter.com/GaryGregory --001517479616d2a57a04a4bbcaa3--