Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to access Ruby strings elements in an application?



How to access Ruby strings elements in an application?..

Answer / Sanjay Kumar Gautam

Ruby provides several ways to access string elements. Here are two common methods:n1. Using array indexing: string_name[index] - where the index is a number representing the position of the character within the string.n2. Iterating over each character using loop or each method: string_name.each { |char| puts char }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

What is the difference between “#==” and “#equal?”

1 Answers  


How does a symbol differ from a string?

1 Answers  


How is an iterator handled in ruby?

1 Answers  


Explain the difference between a single quote and double quote?

1 Answers  


what is the difference between Procs and Blocks?

1 Answers  


How to access Ruby strings elements in an application?

1 Answers  


What must you do first before you can invoke an unboundmethod object?

1 Answers  


What are the ruby variables?

1 Answers  


In how many ways you can compare Ruby string?

1 Answers  


What is retry statement in ruby?

1 Answers  


Tell me what is the role of sub-directory app/controllers and app/helpers?

1 Answers  


How would you create getter and setter methods in ruby?

1 Answers  


Categories