validateIdent

fnstring validateIdent()(string str, string additional_chars = "_", string entity_name = "An identifier", bool no_number_start = true)

Validates an identifier string as used in most programming languages.

The identifier must begin with a letter or with any of the additional_chars and may contain only ASCII letters and digits and any of the additional_chars.

Invalid identifiers will cause an exception with the error description to be thrown.

fnbool validateIdent(R)(ref R error_sink, string str, string additional_chars = "_", string entity_name = "An identifier", bool no_number_start = true) if (isOutputRange!(R, char))

ditto