Return part of a string.

substr

{{$text|substr:<Offset>}}

Arguments

ArgumentDescription
1Offset
2Length

Examples

substr

{{$text = 'abcdef'}}

{{$text|substr:-1}}
{{$text|substr:-2}}
{{$text|substr:-3}}
{{$text|substr:0:-1}}

Output:
f
ef
def
abcde