[#BloombergLP-bslstl-BoyerMooreHorspoolSearcher-2constructor-0c1]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher.adoc[BoyerMooreHorspoolSearcher]::BoyerMooreHorspoolSearcher
:relfileprefix: ../../../
:mrdocs:

Create a `BoyerMooreHorspoolSearcher` object having same state &hyphen;&hyphen; `needleFirst()`, `needleLast()`, `hash()`, and `equal()` &hyphen;&hyphen; as the specified `original` object&period; The specified `basicAllocator` is used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The state of `original` is moved (in constant time) to the new searcher if `basicAllocator &equals;&equals; original&period;allocator()`, and is move&hyphen;inserted (in linear time) using `basicAllocator` otherwise&period; The `original` object is left in an unspecified (valid) state&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
BoyerMooreHorspoolSearcher(
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;BoyerMooreHorspoolSearcher&gt;] original,
    xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator);
----


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