[#BloombergLP-bdlb-BitStringUtil-num1]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitStringUtil.adoc[BitStringUtil]::num1
:relfileprefix: ../../../
:mrdocs:

Return the number of 1 bits in a range 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
num1(
    uint64&lowbar;t const* bitString,
    std::size&lowbar;t index,
    std::size&lowbar;t numBits);
----

== Description

Return the number of 1 bits in the specified `numBits` beginning at the specified `index` in the specified `bitString`&period; The behavior is undefined unless `bitString` has a length of at least `index &plus; numBits`&period;

== Return Value

count of 1 bits in the examined range

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bitString*
| bit string to examine
| *index*
| starting bit position
| *numBits*
| number of bits to examine
|===


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