Checks whether a string ends with a specified substring.
ends_with(x:string, suffix:string, [ignore_case=bool]) -> boolDescription
Section titled “Description”The ends_with function returns true if x ends with suffix and false
otherwise.
Set ignore_case=true to compare using full Unicode case folding instead of
case-sensitive matching.
Examples
Section titled “Examples”Check if a string ends with a substring
Section titled “Check if a string ends with a substring”from {x: "hello".ends_with("lo")}{x: true}Compare case-insensitively
Section titled “Compare case-insensitively”from { ascii: "/API/v1/Users".ends_with("USERS", ignore_case=true), unicode: "Fußstraße".ends_with("STRASSE", ignore_case=true),}{ ascii: true, unicode: true,}