Add documentation for parseHex

This commit is contained in:
Jeroen Ketema
2022-02-04 12:35:13 +01:00
parent 9f4e261625
commit b967eaf25d

View File

@@ -1,6 +1,11 @@
import cpp
import semmle.code.cpp.commons.unix.Constants as UnixConstants
/**
* Gets the number corresponding to the contents of `input` in base-16.
* Note: the first two characters of `input` must be `0x`. For example:
* `parseHex("0x123abc") = 1194684`.
*/
bindingset[input]
int parseHex(string input) {
exists(string lowerCaseInput | lowerCaseInput = input.toLowerCase() |