Optional flag of whether or not the whole string should be returned and the haystack variable cleared on no needle match.
Array to walk and advance.
Token that delimits what should be returned and to where to advance. May be another array or some individual character.
Optional file name to attach to an exception.
Optional line number to attach to an exception.
The string haystack from the start up to the needle token. The original variable is advanced to after the token.