__switch
fn
int __switch(T, caseLabels...)(/*in*/ const scope T[] condition) pure nothrow @safe @nogcSupport for switch statements switching on strings.
Parameters
caseLabels | sorted array of strings generated by compiler. Note the strings are sorted by length first, and then lexicographically. |
condition | string to look up in table |
Returns
index of match in caseLabels, a negative integer if not found