pub fn search_explicit_str_for_mask<const IMM: i32>(
    needle: m128i,
    needle_len: i32,
    haystack: m128i,
    haystack_len: i32
) -> m128i
Available with target feature sse4.2 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, or STR_CMP_I16.
  • A comparison op: STR_CMP_EQ_ANY, STR_CMP_RANGES, STR_CMP_EQ_EACH, or STR_CMP_EQ_ORDERED.
  • The desired out mask style: STR_CMP_BIT_MASK or STR_CMP_UNIT_MASK.

If there’s no match the output is the length of the haystack.

  • Intrinsic: _mm_cmpestrm
  • Assembly: pcmpestrm xmm, xmm, imm8