Template:AnAWord

From Encyclopedia of Scientonomy
Revision as of 22:59, 9 January 2023 by Hakob Barseghyan (talk | contribs) (Created page with "<noinclude> The template is used to add an indefinite article - <code><nowiki>an</nowiki></code> or <code><nowiki>a</nowiki></code> to the given word. The template checks the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The template is used to add an indefinite article - an or a to the given 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.