[#BloombergLP-ball-CategoryManager_RadixTree-forEachPrefix-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CategoryManager_RadixTree.adoc[CategoryManager&lowbar;RadixTree]::forEachPrefix
:relfileprefix: ../../../
:mrdocs:

Call `functor` for each key&hyphen;value pair whose key starts with `prefix`&period;

== Synopses

Declared in `&lt;ball&lowbar;categorymanager&lowbar;radixtree&period;h&gt;`

Call `functor` for each key&hyphen;value pair whose key starts with `prefix`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;FUNCTOR&gt;
xref:BloombergLP/ball/CategoryManager_RadixTree/size_type.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;VALUE&gt;::size&lowbar;type]
xref:BloombergLP/ball/CategoryManager_RadixTree/forEachPrefix-01.adoc[forEachPrefix](
    std::string&lowbar;view const& prefix,
    t&lowbar;FUNCTOR const& functor);
----

[.small]#xref:BloombergLP/ball/CategoryManager_RadixTree/forEachPrefix-01.adoc[_» more&period;&period;&period;_]#

Call `functor` for each key&hyphen;value pair whose key starts with `prefix`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;FUNCTOR&gt;
xref:BloombergLP/ball/CategoryManager_RadixTree/size_type.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;VALUE&gt;::size&lowbar;type]
xref:BloombergLP/ball/CategoryManager_RadixTree/forEachPrefix-03.adoc[forEachPrefix](
    std::string&lowbar;view const& prefix,
    t&lowbar;FUNCTOR const& functor) const;
----

[.small]#xref:BloombergLP/ball/CategoryManager_RadixTree/forEachPrefix-03.adoc[_» more&period;&period;&period;_]#

== Return Value

number of times the functor was called

== Parameters

[cols="1,4"]
|===
| Name| Description
| *prefix*
| key prefix to match
| *functor*
| callable invoked for each matching key&hyphen;value pair
|===


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