Template:Str startswith
Tools
Actions
General
Print/export
In other projects
Appearance
From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by GKFX (talk | contribs) at 12:58, 31 July 2022 (Trim parameters before passing to module as described by the documentation). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
This template uses Lua: |
This is the {{Str startswith}} meta-template.
It returns "yes" if the second parameter is the start of the first parameter. Both parameters are trimmed before use.
Examples
[edit]{{Str startswith|foo (bar)|foo}}
→ yes{{Str startswith|foo|bar}}
→{{Str startswith|(bar)|foo (bar)}}
→{{Str startswith|foo bar | foo }}
→ yes
Border cases:
{{Str startswith}}
→{{Str startswith||}}
→{{Str startswith|| }}
→{{Str startswith| |}}
→
See also
[edit]String-handling templates (help page) | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
The above documentation is transcluded from Template:Str startswith/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Hidden category: