Template:Strfind short: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(re-categorisation per project need, replaced: Wikipedia → Sarkarverse) |
||
Line 2: | Line 2: | ||
{{documentation}} | {{documentation}} | ||
[[Category: | [[Category:Sarkarverse formatting and function templates]] | ||
[[Category:Templates with minimal expansion depth]] | [[Category:Templates with minimal expansion depth]] | ||
</noinclude> | </noinclude> |
Latest revision as of 09:18, 18 December 2013
0
Uses Lua: |
The Template:Strfind_short finds the location, in parameter {1} of the string {2}. If the string is not found, the result is zero (0), indicating no match.
- Usage: {{strfind short|abcdef|bcd}} → 2
- {{strfind short|123456789.|45}} → 4
- {{strfind short|x+2.437-6|2.43}} → 3
- {{strfind short|:***abcd**|*ab}} → 4
Examples
The following are examples:
- {{strfind short|abcdef|bcd}} → 2
- {{strfind short|Fast Forward (film)|(}} → 14
- {{strfind short|Fast Forward Longer (film)|(}} → 21
- {{strfind short|A Funny Thing Happened on the Way to the Forum (film)|(}} → 48
- {{strfind short|abcdef|x}} → 0
- {{strfind short|abcdef|xyz}} → 0
See also
- {{Str find}} - searches strings, but with expansion depth of 18 or more
|
The above documentation is transcluded from Template:Strfind short/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |