Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Str find: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#iferror:{{#titleparts:{{str_find/logic|{{{1|}}}|{{{2|}}}|{{str_len|{{{2|}}}}}}}|1}}|-1}}</includeonly><noinclude>
<includeonly>{{#iferror:{{#titleparts:{{str_find/logic|{{{1|}}}|{{{2|}}}|{{str_len|{{{2|}}}}}}}|1}}|-1}}</includeonly><noinclude>


<nowiki>{{str_find|</nowiki>''text''|''character''<nowiki>}}</nowiki> = Position of first appearance of ''character'' in ''text''.
<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 ''character'' not found in first 50 characters.
Only searches first 50 characters of ''text''.  Returns blank if ''sub_string'' not found in first 50 characters.


[[Category:String manipulation templates]]
[[Category:String manipulation templates]]
</noinclude>
</noinclude>

Revision as of 03:02, 27 February 2009


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

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

Cookies help us deliver our services. By using our services, you agree to our use of cookies.