[#BloombergLP-bslstl-BoyerMooreHorspoolSearcher_CharImp-2constructor-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher_CharImp.adoc[BoyerMooreHorspoolSearcher&lowbar;CharImp]::BoyerMooreHorspoolSearcher&lowbar;CharImp
:relfileprefix: ../../../
:mrdocs:

Create a char&hyphen;optimized implementation for `&lsqb;needleFirst, needleLast)&rsqb;`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;boyermoorehorspoolsearcher&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
BoyerMooreHorspoolSearcher&lowbar;CharImp(
    RNDACC&lowbar;ITR&lowbar;NEEDLE needleFirst,
    RNDACC&lowbar;ITR&lowbar;NEEDLE needleLast,
    HASH hash,
    EQUAL equal,
    xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator);
----

== Description

This implementation is invoked when the specified `hash` is `bsl&colon;&colon;hash&lt;char&gt;` and the specified `equal` is `bsl&colon;&colon;equal&lowbar;to&lt;char&gt;`&period; Neither functor is used because for the special case of `char` the needle metadata is maintained in a fixed size array (256 elements)&period; As always, the specified `basicAllocator` is used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `needleFirst` can be advanced to `needleLast`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *needleFirst*
| beginning of the needle sequence
| *needleLast*
| end of the needle sequence
| *hash*
| hash functor (unused in this specialization)
| *equal*
| equality comparison functor (unused in this specialization)
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


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