Template:Str find
Jump to navigation
Jump to search
0
{{str find|target|string}}
outputs the position in target where string first appears (e.g. an output of "3" would mean beginning at the third character in target). If string is not found, it outputs zero (0).
Examples
Example | Output |
---|---|
{{str find|abcdef|bcd}}
|
2 |
{{str find|abcdefedcba|b}}
|
2 |
{{str find|123456789.|45}}
|
4 |
{{str find|x+2.437-6|2.43}}
|
3 |
{{str find|:***abcd**|*ab}}
|
4 |
{{str find|Fast Forward (film)|(}}
|
14 |
{{str find|Fast Forward Longer (film)|(}}
|
21 |
{{str find|A Funny Thing Happened on the Way to the Forum (film)|(}}
|
48 |
{{str find|abcdef|x}}
|
0 |
{{str find|abcdef|xyz}}
|
0 |
This template was adapted from Template:Strfind short on Wikipedia.
Adaptation is noted for reference and attribution only. This template may differ from the original in function or in usage.
Adaptation is noted for reference and attribution only. This template may differ from the original in function or in usage.
The above documentation is transcluded from Template:Str find/doc.
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.