You've successfully subscribed to The Poor Coder | Hackerrank Solutions
Great! Next, complete checkout for full access to The Poor Coder | Hackerrank Solutions
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Enable dark mode
Ruby - Strings - Methods II
Hackerrank Ruby - Strings - Methods II Solution
In this tutorial, we'll learn about the methods in String class that help us to search and replace portions of the string based on a text or pattern. String.include?(string) - Returns true if str contains the given string or character. Very simple! > "hello".include? "lo" #=> true