Function search_explicit_str_for_mask
pub fn search_explicit_str_for_mask<const IMM: i32>(
needle: m128i,
needle_len: i32,
haystack: m128i,
haystack_len: i32,
) -> m128i
Available on crate feature
dep_safe_arch
only.Expand description
Search for needle
in `haystack, with explicit string length.
In the constant you need to provide (combine with |
):
- A comparison unit:
STR_CMP_U8
,STR_CMP_U16
,STR_CMP_I8
, orSTR_CMP_I16
. - A comparison op:
STR_CMP_EQ_ANY
,STR_CMP_RANGES
,STR_CMP_EQ_EACH
, orSTR_CMP_EQ_ORDERED
. - The desired out mask style:
STR_CMP_BIT_MASK
orSTR_CMP_UNIT_MASK
.
If there’s no match the output is the length of the haystack.
- Intrinsic:
_mm_cmpestrm
- Assembly:
pcmpestrm xmm, xmm, imm8