# Case-insensitive check without a loop
def char_exists_ignore_case(s, target)
# Convert both to lowercase and use include?
s.downcase.include?(target.downcase)
end
# Define the string we want to search in
s = "RubyLanguage"
# Perform the case-insensitive check
exists = char_exists_ignore_case(s, "r")
# Print the raw boolean result
puts exists
# Conditional check
if exists
puts "exists"
else
puts "not exists"
end
=begin
run:
true
exists
=end