Jump to content

Template:Str endswith: Difference between revisions

From wikiNonStop
Content deleted Content added
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>"
 
No edit summary
 
Line 1: Line 1:
{{#ifeq:{{{1|a}}}{{{2|a}}}|{{{1|b}}}{{{2|b}}}|{{#invoke:String|endswith|source={{{1}}}|pattern={{{2}}} }}|yes<!--backward compatibility -->}}<noinclude>
{{#ifeq:{{{1|a}}}{{{2|a}}}|{{{1|b}}}{{{2|b}}}|{{#invoke:W_String|endswith|source={{{1}}}|pattern={{{2}}} }}|yes<!--backward compatibility -->}}<noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 12:30, 18 June 2026

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)}} → yes
  • {{str endswith|foo|bar}}
  • {{str endswith|(bar)|foo (bar)}}
  • {{str endswith|foo bar | bar}} → yes
border cases
  • {{str endswith}} → yes
  • {{str endswith||}} → yes
  • {{str endswith|| }} → yes
  • {{str endswith| |}} → yes

See also

Template:String-handling templates