Function validateIdent

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.

Prototype

string validateIdent(
  string str,
  string additional_chars,
  string entity_name,
  bool no_number_start
);

Authors

Sönke Ludwig

Copyright

© 2012 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.