Skip to content

Bars Specification 0.1.0 — Transform: remove_last

Category: string · Since: 0.1.0

Removes only the last occurrence of a value.

Removes only the last occurrence of value from the string-coerced input, leaving any earlier occurrences untouched.

Input coercion: string

Arguments

Name Type Optional Default
value string no

Arity: 1–1

Worked examples

{{ phrase | remove_last: "o" }}

foo bo
{{ phrase | upcase | remove_last: "L" }}

HELO

Full fixture: transforms/transform-remove_last.json