The OpenD Programming Language

parse

Single character parsing utilities.

  1. bool parse(inout(C)[] str, T value)
    bool
    parse
    (
    T
    C
    )
    (
    ref scope inout(C)[] str
    ,
    ref scope T value
    )
    if (
    T.sizeof == C.sizeof
    )
  2. bool parse(inout(C)[] str, T value)

Return Value

Type: bool

true if success and false otherwise.

Examples

auto s = "str";
char c;
assert(parse(s, c));
assert(c == 's');
assert(s == "tr");

Meta