• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:One2a

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:String2

This is a wrapper for the one2a function in Module:String2.

The one2a function scans through a string, passed as either the first unnamed parameter or |txt=, and converts each occurrence of 'one ' into either 'a ' or 'an ', then returns the resultant string.

Examples

  • {{one2a |one foot. One mile. One inch.One amp. one foot. one mile. one inch. Alone at last.}} → a foot. A mile. An inch.An amp. a foot. a mile. an inch. Alone at last.
  • {{convert|1|ft|spell=in}} → one foot (0.30 m)
  • {{one2a|{{convert|1|ft|spell=in}}}} → a foot (0.30 m)
  • {{convert|2.54|cm|0|disp=out|spell=on}} → one inch
  • {{one2a|{{convert|2.54|cm|0|disp=out|spell=on}}}} → an inch
The above documentation is transcluded from Template:One2a/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:One2a&oldid=25895"
Categories:
  • Lua-based templates
  • String manipulation templates
Last edited on 18 April 2020, at 15:37

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 18 April 2020, at 15:37.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop