Open main menu

Changes

update
{{documentation subpage}}
{{lua|Module:Str endswith}}
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->

This is the {{tl|str endswith}} meta-template.

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

=== Examples ===
* {{tlx|str endswith|foo (bar)|(bar)}} → {{str endswith|foo (bar)|(bar)}}
* {{tlx|str endswith|foo|bar}} → {{str endswith|foo|bar}}
* {{tlx|str endswith|(bar)|foo (bar)}} → {{str endswith|(bar)|foo (bar)}}
* {{tlx|str endswith|foo bar&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;bar}} → {{str endswith|foo bar | bar}}

; border cases
* {{tlx|str endswith}} → {{str endswith}}
* {{tlx|str endswith|<nowiki/>|<nowiki/>}} → {{str endswith||}}
* {{tlx|str endswith|<nowiki/>|&#32;}} → {{str endswith|| }}
* {{tlx|str endswith|&#32;|<nowiki/>}} → {{str endswith| |}}

===See also===
{{String-handling templates |anlys/tech}}

<includeonly>
<!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:String manipulation templates]]
</includeonly>
Anonymous user