after_string

Returns a string which is the subset of haystack after needle and not including needle itself. If needle is not present in haystack, returns an empty string. If needle is empty, throws an exception.

Usage

{{after_string haystack needle flags="irt"}}

Arguments

haystack
The input string

needle
The boundary string.

flags

  • i: treat delimiter as not case-sensitive (default is case-sensitive)
  • r: split text at last instance of delimiter instead of the first
  • t: trim the final result prior to returning (remove all whitespace from beginning and end)

Updated on May 23, 2024
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support