commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory" <ggreg...@seagullsoftware.com>
Subject RE: [lang] Is there a split method based on case?
Date Fri, 19 Nov 2004 03:54:43 GMT
Hello,

I might be going against the tide here... but it still seems to be that
this is such a specialized case that it seems inappropriate for
WordUtils or StringUtils. Of course, using a regular expression might
not be the answer you are looking for ;-) 

It would be nice to avoid a case where some people that happen to all
need a util and all happen be active in [lang] put something in [lang]
because it is convenient instead of the feature truly belonging in the
project. My (humble:-) claim is that this feature is, at least and at
best, precariously on the border.

OTOH, if it must be in and since we have been talking about this in the
context of class names only, perhaps this belongs in ClassUtils or in a
new TypeNameUtils (not crazy about that but I'm just thinking aloud). I
am using "Type" instead of "Class" to reflect use for classes and
interfaces, a la Eclipse.

Thanks,
Gary

-----Original Message-----
From: Eric Pugh [mailto:epugh@upstate.com] 
Sent: Thursday, November 18, 2004 3:10 AM
To: Jakarta Commons Developers List; Corey Scott
Subject: RE: [lang] Is there a split method based on case?

It seems like it might also help flesh out WordUtils..   Would just a
method
that splits be enough, or is there any reason to get fance and insert
spaces
etc...?

> -----Original Message-----
> From: Corey Scott [mailto:corey.scott@gmail.com]
> Sent: Thursday, November 18, 2004 4:40 AM
> To: Jakarta Commons Developers List
> Subject: Re: [lang] Is there a split method based on case?
>
>
> I also had to recently do this, for the same reasons :-)
>
> -Corey
>
>
> On Thu, 18 Nov 2004 00:26:16 +0000 (GMT), Stephen Colebourne
> <scolebourne@btopenworld.com> wrote:
> > FYI, I recently had to write this same method to take
> > resource keys and make more human readable sentences.
> > So, maybe there is space for it in lang.
> >
> > Stephen
> >
> > --- Gary Gregory <ggregory@seagullsoftware.com>
> > wrote:
> > > Hello,
> > >
> > > This sounds like a job for regular expression
> > > substitution: "replace all
> > > uppercase chars with a space followed by that upper
> > > case char".
> > >
> > > See the ORO project:
> > > http://jakarta.apache.org/oro/index.html
> > >
> > > Gary
> > >
> > > -----Original Message-----
> > > From: Eric Pugh
> > > [mailto:epugh@opensourceconnections.com]
> > > Sent: Wednesday, November 17, 2004 3:11 AM
> > > To: Commons-Dev
> > > Subject: [lang] Is there a split method based on
> > > case?
> > >
> > > Hi all,
> > >
> > > I am converting some classnames to user friendly
> > > names.  So I have a
> > > class
> > > call my.companies.own.SpecialStep and I can use the
> > >
> > substringAfterLast("my.companies.own.SpecialStep",".")
> > > to return
> > > "SpecialStep".  I want to convert this to "Special
> > > Step".  Any ideas on
> > > how
> > > to do this using commons-lang?  If I had
> > > AnotherSpecialStep, I'd want to
> > > split it up so I got "Another Special Step".
> > >
> > > Would this be a good idea for commons-lang's
> > > WordUtils?
> > >
> > > Eric
> > >
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > commons-dev-help@jakarta.apache.org
> > >
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > commons-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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


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


Mime
View raw message