Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

Starts With Modifier

Returns true if the value starts with a given string. This comparison is case-insensitive.

reply: Actually, I disagree because this is the internet.
{{ if reply | starts_with('actually') }}
{{ if reply | starts_with('respectfully') }}
@if (Statamic::modify($reply)->startsWith('actually')->fetch())
@endif
@if (Statamic::modify($reply)->startsWith('respectfully')->fetch())
@endif
true
false