Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concatreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydecimalformatlengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
flattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
eqgtgtenot
Default
default
Render
Template
template
Docs/Sintax/Text/Trim

Trim

Strip whitespace, prefixes, and suffixes.

Trim

trimStrips any of the cutset characters from both ends of a string.{{ input | trim:'/' }}trim_prefixRemoves the given prefix once from the start of a string, returning it unchanged when it does not start with that prefix.{{ path | trim_prefix:'/api' }}trim_suffixRemoves the given suffix once from the end of a string, returning it unchanged when it does not end with that suffix.{{ file | trim_suffix:'.txt' }}
Edit or read the source on GitHub
PrevioussplitNext trim

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub