# given a string, return the character after every letter "r"
#
# pirates_say_arrrrrrrrr("are you really learning Ruby?") # => "eenu"
# pirates_say_arrrrrrrrr("Katy Perry is on the radio!")   # => "rya"
# pirates_say_arrrrrrrrr("Pirates say arrrrrrrrr")        # => "arrrrrrrr"

def pirates_say_arrrrrrrrr(string)
  str = ""
  splitted = string.chars
  splitted.each_with_index do |item, index|
    if (item.downcase == 'r') && index != splitted.length - 1
    	str += splitted[index +1]
    end
  end
  str
end
