prefix ~ name when name is empty or starts with an
ASCII digit, name otherwise; 2 with prefix n -> n2.
string prefixDigit(string name, string prefix) @safe pure nothrowPrefixes name with prefix when it would otherwise start with a digit (no D identifier can).
name | the candidate identifier. |
prefix | the prefix to use (a generator's choice, e.g. "n" for enum items or "_" for module names). |
prefix ~ name when name is empty or starts with an
ASCII digit, name otherwise; 2 with prefix n -> n2.