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

Constructors

== Synopses

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

Create a `BoyerMooreHorspoolSearcher` object having same state &hyphen;&hyphen; `needleFirst()`, `needleLast()`, `hash()`, and `equal()` &hyphen;&hyphen; as the specified `original` object, and that uses the currently installed default allocator to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-03.adoc[BoyerMooreHorspoolSearcher](xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher.adoc[BoyerMooreHorspoolSearcher] const& original);
----

[.small]#xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-03.adoc[_» more&period;&period;&period;_]#

Create a `BoyerMooreHorspoolSearcher` object having same state &hyphen;&hyphen; `needleFirst()`, `needleLast()`, `hash()`, and `equal()` &hyphen;&hyphen; as the specified `original` object by moving (in constant time) the state of `original` to the new searcher&period; The allocator of `original` is propagated for use in the newly created searcher&period; The `original` object is left in an unspecified (valid) state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-06.adoc[BoyerMooreHorspoolSearcher](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;BoyerMooreHorspoolSearcher&gt;] original) noexcept;
----

[.small]#xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-06.adoc[_» more&period;&period;&period;_]#

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;


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

[.small]#xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-0c1.adoc[_» more&period;&period;&period;_]#

Create a `BoyerMooreHorspoolSearcher` object having same state &hyphen;&hyphen; `needleFirst()`, `needleLast()`, `hash()`, and `equal()` &hyphen;&hyphen; as the specified `original` object&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-0b.adoc[BoyerMooreHorspoolSearcher](
    xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher.adoc[BoyerMooreHorspoolSearcher] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator);
----

[.small]#xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Create a `BoyerMooreHorspoolSearcher` object that can search for the sequence of `value&lowbar;type` values found in the specified range `&lsqb;needleFirst, needleLast)&rsqb;`&period; Generate meta&hyphen;data and save for use by `operator()`&period; The complexity of this process is O(M) where M is the length of the &quot;needle&quot;&period; Optionally specify a `hash` functor mapping mis&hyphen;matched values to the size of the next step in the search &hyphen;&hyphen; as large as, `needleLast &hyphen; needleFirst`&period; Optionally specify an `equal` functor for use with `hash` and for use by `operator()`&period; See &lcub;Requirements for `HASH` and `EQUAL`&rcub;&period; Optionally specify `basicAllocator` to supply memory&period; If `basicAllocator` is 0 or not supplied, the currently installed default allocator is used&period; The behavior is undefined unless `needleFirst` can be advanced to `needleLast`&period;


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

[.small]#xref:BloombergLP/bslstl/BoyerMooreHorspoolSearcher/2constructor-0e.adoc[_» more&period;&period;&period;_]#


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