Module:String/doc: Difference between revisions

Content deleted Content added
Remove {{high-use}} as now redundant to {{used in system}}
endswith: Accuracy
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 365:
== endswith ==
Usage:
: <code><nowiki>{{#invoke:</nowiki>String|endswith|''source_str''|''pattern_stringsearch_string''}}</code>
 
OR
 
: <code><nowiki>{{#invoke:</nowiki>String|endswith|source= ''source_string'' |pattern= ''pattern_stringsearch_string''}}</code>
Returns "yes" if the source string ends with the patternsearch string. Use Bothnamed stringsparameters areto have the strings trimmed before use. Despite the parameter name, ''search_string'' is not a Lua pattern, it is interpreted literally.
 
* <code><nowiki>"{{#invoke:String|endswith|xxxyyy|y}}"</nowiki></code> → "{{#invoke:String|endswith|xxxyyy|y}}"