Template:In str/doc

From Sunrust Wiki
Jump to navigation Jump to search

Same as {{#invoke:String|find|...}}, but provides an extra option to return an alternative string.

{{In_str
|source= 
|target= 
|start= 
|plain=
|nomatch=
}}

Examples

Wikitext Result Description
{{In_str
  |source=Ruby, Fire
  |target= Fire
  |nomatch=
  |plain=true}}
7 It returns the position of target parameter in string.
{{#if:{{In_str
  |source=Ruby, Fire
  |target= Fire
  |nomatch=
  |plain=true}}|[[File:Debuff_fire.jpg]]|}}
Debuff fire.jpg It does an "if condition", if the value is null, this displays an image.
In this case, the result matches the condition, and the image is showed.
{{#if:{{In_str
  |source=Sapphire, Frost
  |target= Fire
  |nomatch=
  |plain=true}}|[[File:Debuff_fire.jpg]]|}}
Almost the same as above, but the word "Fire" isn't present in the source string.
In this case, the condition fails, and the image isn't shown.

See Also