Template:Substring/doc

From 'City of Adelaide' History and Genealogy Site
Jump to navigation Jump to search

{{#invoke:Message box|mbox}} The Template:Substring extracts a specified substring from a text string, for a specific offset and length. The beginning of the string is offset location 0 (zero).

Usage

{{substring|<string>|<offset>|<length>}}

Example: {{substring|abcdefg|2|3}} gives: cde, as 3 characters from offset position 2, in string "abcdefg".