Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > iterate over a series of alphabetically increasing strings

Reply
Thread Tools

iterate over a series of alphabetically increasing strings

 
 
Vellingiri Arul
Guest
Posts: n/a
 
      09-19-2007
Dear Friends,
How could i do iterate over a series of alphabetically increasing
strings.

by
Vellingiri.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Robert Klemme
Guest
Posts: n/a
 
      09-19-2007
2007/9/19, Vellingiri Arul <(E-Mail Removed)>:
> Dear Friends,
> How could i do iterate over a series of alphabetically increasing
> strings.


alphabetically_increasing_strings.each {|str| ...}

Or did you want to know how to sort them?

Cheers

robert

 
Reply With Quote
 
 
 
 
Vellingiri Arul
Guest
Posts: n/a
 
      09-19-2007
Robert Klemme wrote:
> 2007/9/19, Vellingiri Arul <(E-Mail Removed)>:
>> Dear Friends,
>> How could i do iterate over a series of alphabetically increasing
>> strings.

>
> alphabetically_increasing_strings.each {|str| ...}
>
> Or did you want to know how to sort them?
>
> Cheers
>
> robert


Yes,
I want to sort them.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Sebastian Hungerecker
Guest
Posts: n/a
 
      09-19-2007
Vellingiri Arul wrote:
> > 2007/9/19, Vellingiri Arul <(E-Mail Removed)>:


> >> Dear Friends,
> >> How could i do iterate over a series of alphabetically increasing
> >> strings.

> I want to sort them.


Then use Enumerable#sort
Like: %w(bb aa cc).sort
#=> ["aa", "bb", "cc"]


HTH,
Sebastian
--
NP: Rapture - I Am Complete
Jabber: http://www.velocityreviews.com/forums/(E-Mail Removed)
ICQ: 205544826

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort outer and inner strings alphabetically Brion Javascript 10 09-03-2007 04:51 PM
iterate over a series of nodes in an XML file Diez B. Roggisch Python 4 07-05-2006 10:14 PM
nested:iterate or logic: iterate with multibox?? runescience Java 0 02-09-2006 12:57 AM
What is the difference between A Series, G Series and S series of Canon Cameras zxcvar Digital Photography 3 09-09-2003 01:30 AM
<logic:iterate /> iterate beyond items in the collection Gogo Java 1 09-04-2003 08:40 PM



Advertisments