Difference between revisions of "Template:AnA"
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
-->{{#if: {{{1|}}}<!-- | -->{{#if: {{{1|}}}<!-- | ||
-->|<!-- | -->|<!-- | ||
− | -->{{#switch: {{#sub:{{{1}}}|0|1}}<!-- | + | -->{{#switch: {{lc:{{#sub:{{{1}}}|0|1}}}}<!-- |
-->|a<!-- | -->|a<!-- | ||
-->|e<!-- | -->|e<!-- |
Revision as of 19:36, 5 January 2023
This template is used to add an indefinite article - an
or a
to the word. The template checks the first character of the string and does the following:
- for a, e, i, o, u, it adds an "an"
- for other letters, adds an "a"
- for anything else, returns the original string
NOTE: As any "printing" template, it doesn't store any values anywhere, but merely returns a value.
Parameters:
string
- any string to which the article should be added.