Template:Trim punctuation
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Removes trialing punctuation from a string, while preserving trialing full stops. Also removes trailing spaces.
A typical use would be to remove trailing punctuation from names or other fields in citations.
Based on w:Template:Trim brackets
Usage[edit source]
Parameters:
- text string
Characters removed[edit source]
- ,
- ;
- spaces
Examples[edit source]
{{Trim punctuation|Smith,}}
→ Smith
{{Trim punctuation|Smith, J.}}
→ Smith, J.
{{Trim punctuation|Smith;}}
→ Smith
{{Trim punctuation|Smith,; }}
→ Smith
See also[edit source]
The above documentation is transcluded from Template:Trim punctuation/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |