[#BloombergLP-bdlb-BitStringUtil-find1AtMaxIndex-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitStringUtil.adoc[BitStringUtil]::find1AtMaxIndex
:relfileprefix: ../../../
:mrdocs:

Return the index of the most&hyphen;significant 1 bit in the specified `bitString` in the specified range `&lsqb;begin &period;&period; end)&rsqb;`, if such a bit exists, and `k&lowbar;INVALID&lowbar;INDEX` otherwise&period; The behavior is undefined unless `begin &lt;&equals; end` and `end` is less than or equal to the length of `bitString`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::size&lowbar;t
find1AtMaxIndex(
    uint64&lowbar;t const* bitString,
    std::size&lowbar;t begin,
    std::size&lowbar;t end);
----


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