Template:Str find/doc
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
This is a documentation subpage for Template:Str find. It contains usage information, categories and other content that is not part of the original template page. |
- Usage
- Returns the position (1 for the first character) of first appearance of substring in a text, -1 if not found.
- Examples
-
- {{Str find|Panthera (genus)|P}} → 1 (first character)
- {{Str find|Panthera (genus)|a}} → 2 (second character)
- {{Str find|Panthera (genus)|(}} → 10
- {{Str find|Panthera (genus)|/}} → -1 (means not found)
- {{Str find|Panthera (genus)|}} → 1 (Warning: empty substring returns 1)
- Syntax
{{Str find | <text> | <substring> }}
- Parameters
-
- <text>
- the tested string
- <substring>
- See also
-
{{Str find/logic}}
a subtemplate