Jump to content

Template:Str endswith

From wikiNonStop
Revision as of 12:26, 18 June 2026 by Majestix (talk | contribs) (Created page with "{{#ifeq:{{{1|a}}}{{{2|a}}}|{{{1|b}}}{{{2|b}}}|{{#invoke:String|endswith|source={{{1}}}|pattern={{{2}}} }}|yes<!--backward compatibility -->}}<noinclude> {{documentation}} </noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

yes

Template documentation

This is the {{Str endswith }} meta-template.

It returns "yes" if the first parameter ends with the second parameter. Both parameters are trimmed before use.

Examples

  • {{str endswith|foo (bar)|(bar)}}Script error: The function "endswith" does not exist.
  • {{str endswith|foo|bar}}Script error: The function "endswith" does not exist.
  • {{str endswith|(bar)|foo (bar)}}Script error: The function "endswith" does not exist.
  • {{str endswith|foo bar | bar}}Script error: The function "endswith" does not exist.
border cases
  • {{str endswith}} → yes
  • {{str endswith||}}Script error: The function "endswith" does not exist.
  • {{str endswith|| }}Script error: The function "endswith" does not exist.
  • {{str endswith| |}}Script error: The function "endswith" does not exist.

See also

Template:String-handling templates