Skip to content

Tag Archives: Ruby-String

split is a String class method in Ruby which is used to split the given string into an array of substrings based on a pattern… Read More
String Interpolation, it is all about combining strings together, but not by using the + operator. String Interpolation works only when we use double quotes… Read More
sub and gsub string methods that use regular expressions, and their in-place variants are sub! and gsub!. The sub & sub! replaces the first occurrence… Read More
A regular expression is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings. Ruby regular expressions i.e.… Read More
In Ruby, string is a sequence of one or more characters. It may consist of numbers, letters, or symbols. Here strings are the objects, and… Read More