Template:Str endswith
Jump to navigation
Jump to search
yes
Template documentation (for the above template, sometimes hidden or invisible)[view] [edit] [history] [refresh]
This is the {{
str endswith}} meta-template.
It returns "yes" if the first parameter ends with the second parameter. It uses both {{str left}} and {{str len}}, so it's subject to their limitations. 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
- {{str endswith|[499 characters]X|X}} → yes
- {{str endswith|[499 characters]X|Y}} →
- {{str endswith|[499 characters]X|[same 499 characters]X}} → yes
- {{str endswith|[499 characters]X|[same 499 characters]Y}} →
- {{str endswith|[500 characters]X|X}} →
- {{str endswith|[500 characters]X|Y}} →
The above text is transcluded from Template:Str endswith/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?) Please add categories and interwikis to Template:Str endswith/doc. (View all subpages of this page.)
If you're done making changes, please refresh the text. (Why?) Please add categories and interwikis to Template:Str endswith/doc. (View all subpages of this page.)