Skip to content

Tag Archives: Ruby String-class

bytesize is a String class method in Ruby which is used to get the length of the given string in bytes. Syntax: str.bytesize Parameters: Here,… Read More
ascii_only? is a String class method in Ruby which is used to check the string which has only ASCII characters. Syntax: str.ascii_only? Parameters: Here str… Read More
=~() is a String class method in Ruby which is used for matching purpose. If the given object is a Regexp, then this method will… Read More
concat is a String class method in Ruby which is used to Concatenates two objects of String. If the given object is an Integer, then… Read More
empty? is a String class method in Ruby which is used to check whether the string length is zero or not. Syntax: str.empty? Parameters: Here,… Read More
reverse is a String class method in Ruby which is used to return a new string with the characters from the given string in reverse… Read More
length is a String class method in Ruby which is used to find the character length of the given string. Syntax: str.length Parameters: Here, str… Read More
casecmp? is a String class method in Ruby which is used to return true if both the string are equal after Unicode case folding and… Read More
casecmp is a String class method in Ruby which is Case-insensitive version of String#<=>. For now, case-insensitivity only works on characters A-Z/a-z, not all of… Read More
capitalize! is a String class method in Ruby which is used to return a copy of the given string by converting its first character uppercase… Read More
capitalize is a String class method in Ruby which is used to return a copy of the given string by converting its first character uppercase… Read More

Start Your Coding Journey Now!