Template:Hasdot

The Template:Hasdot checks the end of parameter 1 to see if it ends with a dot "." or with a wikilinked dot "." (as in "D.C." ). If either dot is present, then it functions as true, and returns either the word "hasdot" or "haslinkdot".
 * Usage:         &rarr; haslinkdot
 * &rarr; hasdot

The optional parameter "strlen=n" can be set to specify the length of the string to check. For example, strlen=7 would check the 7th position for a dot "." or ending with ".]]" at the exact end of seven characters (dot at 5).

Within a page, the template could be used to add an end-dot only when needed, as to append an end dot "." only when "zzz" does not have one. Note that any text can be used to trigger the logic, because the text is not repeated, just quietly tested, and any other text can be displayed before, or after, checking for the end-dot.