Similar Collections


In Ruby, a String object has an arbitrary sequence of bytes, typically representing text or binary data. A String object may be created using String::new or as literals.

This section contains Ruby strings programs, practice these Ruby programs to learn the concept of Ruby strings, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Ruby strings programs.

questions

Title
Ruby program to illustrate the creation of strings
Ruby program to illustrate the difference between single quote string and double-quote string
Ruby program to create a String object
Ruby program to find the length of a string
Ruby program to get characters from a string using the index
Ruby program to get a substring from the string
Ruby program to demonstrate the example to write double-quotes in a string
Ruby program to demonstrate the escape sequence characters
Ruby program to demonstrate the string concatenation
Ruby program to make string immutable
Ruby program to compare two strings using the Equal To (==) operator
Ruby program to compare two strings using the eql?() method
Ruby program to compare two strings by ignoring case
Ruby program to check the given string is empty or not
Ruby program to demonstrate the string interpolation
Ruby program to check a string contains a specified substring or not
Ruby program to get the index of the substring in a string
Ruby program to pad a string with 0\'s on left side
Ruby program to pad a string with 0\'s on the right side
Ruby program to convert a string into uppercase
total questions: 44

Questions

44

Views

741

Best Answers

299

Points

5