std.suffixof

BOOLstd.suffixofSTRINGsSTRINGends_with

Available inall subroutines.

True if the string s ends with the characters of the string ends_with. An empty string is not considered a suffix.

Returns false otherwise.

See std.replace_suffix for substituting a suffix.

Example

declare local var.bool BOOL;
set var.bool = std.suffixof("rectangles", "angles");

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)