advancePast

  1. auto advancePast(Haystack haystack, Needle needle, Flag!"inherit" inherit, string callingFile, size_t callingLine)
  2. auto advancePast(Haystack haystack, Needle needle, string callingFile, size_t callingLine)
    @safe deprecated pragma(inline, true) @safe
    advancePast
    (
    Flag!"inherit" inherit
    Haystack
    Needle
    )
    (
    auto ref return scope Haystack haystack
    ,
    const scope Needle needle
    ,
    const string callingFile = __FILE__
    ,
    const size_t callingLine = __LINE__
    )

Parameters

inherit

Optional flag of whether or not the whole string should be returned and the haystack variable cleared on no needle match.

haystack Haystack

Array to walk and advance.

needle Needle

Token that delimits what should be returned and to where to advance. May be another array or some individual character.

callingFile string

Optional file name to attach to an exception.

callingLine size_t

Optional line number to attach to an exception.

Return Value

Type: auto

The string haystack from the start up to the needle token. The original variable is advanced to after the token.

Meta