Awee

trim-suffix

TrimSuffix removes a trailing suffix string or trailing whitespace from the value.

TrimSuffix removes a trailing suffix string or trailing whitespace from the value.

Input

string bytes

Parameters

#TypeRequired
0stringno

Returns

string, bytes

Examples

Drop a trailing slash from a URL

Input

url = "https://example.com/users/"

Template

{{ url | trim-suffix:'/' }}

Output

https://example.com/users

Trim trailing whitespace from a paragraph

Input

text = "Welcome aboard.   "

Template

{{ text | trim-suffix }}

Output

Welcome aboard.

How is this guide?

On this page