Skip to content Skip to footer navigation
You are reading the docs for an old version of Statamic. Consider upgrading to Statamic 6.

Ensure Right Modifier

Ensures that the string ends with a specified string. If it doesn't, it will now.

links:
- statamic
- wilderborn.com
{{ links }}
<li>{{ value | ensure_right('.com') }}</li>
{{ /links }}
@foreach ($links as $link)
<li>{{ Statamic::modify($value)->ensureRight('.com') }}</li>
@endforeach
<li>statamic.com</li>
<li>wilderborn.com</li>