How to check that a string starts with a specified letter in Ruby?
You can use the String#start_with?method
String#start_with?
'String'.start_with? 'S' => true
You can also indicate possible start options.
'String'.start_with? 'E', 'S' => true
you can use regex
str.match /^X/