[#BloombergLP-bdlb-NumericParseUtil-characterToDigit]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NumericParseUtil.adoc[NumericParseUtil]::characterToDigit
:relfileprefix: ../../../
:mrdocs:

Determine whether the specified `character` represents a digit in the specified `base`&semi; return the numeric equivalent if so, and &hyphen;1 otherwise&period; The behavior is undefined if either `character` or `base` is 0 and unless `2 &lt;&equals; base` and `base &lt;&equals; 36` (i&period;e&period;, bases where digits are representable by characters in the range &lsqb;`0`&hyphen;`9`&rsqb;, &lsqb;`a`&hyphen;`z`&rsqb;, or &lsqb;`A`&hyphen;`Z`&rsqb;)&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;numericparseutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
characterToDigit(
    char character,
    int base);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
