No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation}} | {{Documentation}} | ||
<includeonly><onlyinclude>{{#ifeq:{{#rpos:{{{2}}}|{{{1}}}}}|-1|{{{2}}}| | <includeonly><onlyinclude> | ||
{{#sub:{{{2}}}|{{#expr:{{#len:{{{2}}}-1}}}}}}</onlyinclude></includeonly> | {{#ifeq:{{#rpos:{{{2}}}|{{{1}}}}} | ||
|-1|{{{2}}} | |||
|{{#sub:{{{2}}}|0|{{#expr:{{#len:{{{2}}}}} - 1}}}} | |||
}}</onlyinclude></includeonly> | |||
Latest revision as of 14:00, 23 February 2024
Template:TrimEnd is used to remove a character, typically a delimiter, from the end of a string.
Usage
It accepts two mandatory parameter:
- is the character to be removed.
- is the string to be parsed.
Returns
{{TrimEnd|;|Peng diana-patient-p.png;Hope tommelise-casual-p.png;Hope charlotte-casual-p.png;Hope justice-casual-p.png;Green-arthur gold-p.png;Hope charlotte-jammies-p.png;}} returns:
Peng diana-patient-p.png;Hope tommelise-casual-p.png;Hope charlotte-casual-p.png;Hope justice-casual-p.png;Green-arthur gold-p.png;Hope charlotte-jammies-p.png
The documentation above was transcluded from Template:TrimEnd/Documentation. [edit]
