[#BloombergLP-bdlc-BitArray-find1AtMaxIndex] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::find1AtMaxIndex :relfileprefix: ../../../ :mrdocs: Return the highest index of a 1 bit in the optional range. == Synopsis Declared in `<bdlc_bitarray.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t find1AtMaxIndex( std::size_t begin = 0, std::size_t end = k_INVALID_INDEX) const; ---- == Description Return the index of the most‐significant 1 bit in this array in the range optionally specified by `begin` and `end`, and `k_INVALID_INDEX` otherwise. The range is `[begin .. effectiveEnd)]`, where `effectiveEnd == length()` if `end` is not specified and `effectiveEnd == end` otherwise. The behavior is undefined unless `begin <= effectiveEnd <= length()`. == Return Value highest index of a 1 bit in the range, or `k_INVALID_INDEX` == Parameters [cols="1,4"] |=== | Name| Description | *begin* | start of the search range (inclusive) | *end* | end of the search range (exclusive); length if omitted |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#