This example shows how to check if a string ends with a given suffix.

true = String.ends_with?("Period.", ".")

# True if any of list values match:
true  = String.ends_with?("Period.", [".","?"])
false = String.ends_with?("      !", [".","?"])

Documentation: String.ends_with?/2