Sandeep Gudibanda
2008-Jul-21 19:02 UTC
How do I test if variable Name starts with Alphabet or not?
Hi, I need to check if a variable "name" starts with a variable or not, how do i do that? Essential, i want to sort array of names alphabetically : i was using names.sort_by{|c| "c[''name'']} But if name has numerical or special characters, they score well in sorting and are there in the beginning of the sorted list. But I want those special names to be in the end. How do i do this? Please suggest regards, SG -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---