/pcmp

Simple library using to help use the pcmpestri SSE 4.2 instruction.

Primary LanguageCBSD 2-Clause "Simplified" LicenseBSD-2-Clause

pcmp

Simple library for utilizing the pcmpestri SSE 4.2 instruction. A non-sse variant is provided to simplify use across platforms.

Testing

To run the test suite:

make test

Functions

pcmp_eq

Compares the case-sensitive equality of two strings.

int pcmp_eq (const uint8_t *s1, const uint8_t *s2, int n);

pcmp_leq

Compares the equality of a mixed case string to a lower case string.

int pcmp_leq (const uint8_t *s1, const uint8_t *s2, int n);

pcmp_range

Finds the the first character matching the range string.

const uint8_t *pcmp_range (const uint8_t *cmp, int clen, const uint8_t *rng, int rlen);

The range string is a sequence of character pairs where the range is a value inclusively between the pair of characters.

pcmp_set

Finds the the first character matching any character in the set string.

const uint8_t *pcmp_set (const uint8_t *cmp, int clen, const uint8_t *set, int slen);