Template:GetSection

From Descent-Community Wiki 1.2
Revision as of 22:31, 15 June 2016 by Psymia (talk | contribs) (Add GetSection)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Template documentation (for the above template, sometimes hidden or invisible)
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):

Visit Template:GetSection/doc to edit this text! (How does this work?)