Template:Class plural/doc

This template returns the plural form of a given class name. Some names are both singular and plural, some are spelled differently (e.g. thief and thieves). The case of the name is preserved, but if they ever come up with a multi-word class name that requires an alternate spelling (other than adding an 's' suffix) then some more logic will have to be added.

Examples:
 * returns.
 * returns.
 * returns.
 * returns.

Under the Hood
Here is what the template looks as of this writing:

The input to the template, let's say it was "Thief", is the value of the first and only parameter. The  function converts it to lower-case, so "Thief" becomes "thief". Then the  statement compares "thief" with its list of cases, looking for a match. Near the bottom of the list it finds "thief" and returns the value. The function  is the substring function which in this case takes the first character (index of 0, length of 1) of , which is "T", and appends "hieves" to form "Thieves", which is returned as the result of the template. If a word is both singular and plural, then just return it (e.g., "Samurai" returns "Samurai"). If the argument is not found in the list of cases, then the  case is used to just put an 's' on the end of the word and return it.