Template:Str endswith

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Str endswith/doc.

Returns yes if a string ends with a specified suffix, nothing otherwise.
Note: if you want to edit this template, first try your modifications on {{Str endswith/sandbox}}.You can then test your edits in {{Str endswith/testcases}}.
When the new version is ready, you can move it to the main template.
  • {{Str endswith|example/doc|/doc}} → yes
  • {{Str endswith|example|/doc}} → "" (nothing)
but be careful - no end trimming!
  • {{Str endswith|example/doc| /doc}} → yes
  • {{Str endswith|example/doc|/doc }}
  • {{Str endswith|example/doc| /doc }}

{{Str endswith | <string> | <suffix> | nocategory=<nocategory> }}
  • <string>
the tested string
  • <suffix>
the suffix to be searched at the end of the tested <string>
  • nocategory=<nocategory>
Not used, should be removed from doc and template