Template:GetSection/doc: Difference between revisions

From Descent-Community Wiki 1.2
Jump to navigation Jump to search
(Document GetSection)
 
(No difference)

Latest revision as of 22:30, 15 June 2016

Description
Use this template to check if a suffix is at the end of a string.
This is used to access the correct template on pages where the Template:Infobox card is used multiple times.
The template returns an empty string if the suffix isn't found.
The template returns the string without the suffix, if the suffix is found.
Syntax
{{GetSection|<InputString>|<Suffix>}}
Examples
test(asdf1, 1): asdf
test(asdf, 1):
test(asdf1asdf1, 1): asdf1asdf
test(synopsis_overlord, _overlord): synopsis
test(synopsis_overlord, _hero):