matchFirst

Matching input with node. Compatibility with std.regex.matchFirst.

  1. inout(char)[] matchFirst(inout(char)[] input, Node node)
    @safe pure nothrow
    inout(char)[]
    matchFirst
    (
    scope return inout(char)[] input
    ,
    const Node node
    )
  2. auto ref matchFirst(Data input, Node node)

Examples

ditto

const x = "ab";
assert(x.matchFirst(lit(x[0 .. 1])) is x[0 .. $]);
assert(x.matchFirst(lit(x[1 .. 2])) is x[1 .. 2]);

Meta