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.
Matt On Thu, Jun 2, 2011 at 9:01 AM, sebb <seb...@gmail.com> wrote: > On 2 June 2011 14:53, Gary Gregory <garydgreg...@gmail.com> wrote: >> Or [cli]? > > Could be useful in property files as well, so I don't think CLI is > appropriate. > >> would this be a new class? > > If necessary. > >> Or more an additional parseMemSize Boolean param? > > ??? > >> Gary >> >> On Jun 2, 2011, at 9:48, sebb <seb...@gmail.com> wrote: >> >>> A mail on the Tomcat user list asked why Tomcat does not support >>> shorthand suffices such as k & m when providing memory sizes, as is >>> done by the the Java -Xms etc options. >>> >>> Seems to me this might be a useful addition to Lang? >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >>> For additional commands, e-mail: dev-h...@commons.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org