String.ends_with

String.ends_with

String.ends_with

Function

Determine whether the string ends with the specified suffix.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
suffixAnyNoNoneThe suffix to be matched will be converted to a string first when called.

Return value

TypeDescription
BoolReturns true if the match is successful, otherwise returns false.

Example

Notes

  • Return false when no parameters are passed to avoid empty parameters being mismatched as empty strings.