Difference between revisions of "Template:Str find"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
m (Reverted edits by Happy-melon (talk) to last version by Dragons flight)
(Updated to use the more efficient {{str len full}}. Tested in /sandbox. And only use is {{italictitle}} and tested the sandbox version on that one too. And removed unneeded <includeonly> tags.)
Line 1: Line 1:
<includeonly>{{#titleparts:{{str_find/logic|{{{1|}}}|{{{2|}}}|{{str_len|{{{2|}}}}}}}-1|1}}</includeonly><noinclude>
+
{{#titleparts: {{str find/logic|{{{1|}}}|{{{2|}}}|{{str len full|{{{2|}}}}}}}-1 | 1 }}<noinclude>
  
<nowiki>{{str_find|</nowiki>''text''|''sub_string''<nowiki>}}</nowiki> = Position of first appearance of ''sub_string'' in ''text''.
+
 
 +
== Template documentation ==
 +
 
 +
<nowiki>{{str find|</nowiki>''text''|''sub_string''<nowiki>}}</nowiki> = Position of first appearance of ''sub_string'' in ''text''.
  
 
Only searches first 50 characters of ''text''.  Returns -1 if ''sub_string'' not found in first 50 characters.
 
Only searches first 50 characters of ''text''.  Returns -1 if ''sub_string'' not found in first 50 characters.

Revision as of 21:04, 28 March 2009

Template:Str find/logic-1


Template documentation

{{str find|text|sub_string}} = Position of first appearance of sub_string in text.

Only searches first 50 characters of text. Returns -1 if sub_string not found in first 50 characters.